Can I use conditional expression in StdCalibrate

29 views
Skip to first unread message

Praveen Chandrasekaran

unread,
Jul 20, 2020, 7:57:28 AM7/20/20
to weewx-user
Hi,

My indoor humidity sensor has gone bad and it rolls from 99percent to 0 instead of 100.

I tried adding a QC but that fills the log every loop data. Also graphs are broken.

Can I put an expression like

Foo = (Foo == 0) ? 100 : foo

In StdCalibrate instead?

I know that I will never hit 0 indoor humidity here.

Regards,
Praveen

Tom Keffer

unread,
Jul 20, 2020, 8:14:48 AM7/20/20
to weewx-user
Any Python expression can be used. It would look like:

inHumidity = inHumidity if inHumidity else 100.0

Basically, any value that is non-zero will be retained. Otherwise, it is set to 100.0

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1f44387e-574d-4d04-a6f0-f2f4f53fc2bfo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages