Hi,
You want something like:
outHumidity = outHumidity if extraHumid1 is None else extraHumid1
My only question is what behaviour do you see when extraHumid1 is not
provided; is extraHumid1 set to None (in which case the above will work as
you want) or is extraHumid1 omitted from the packet (in which case the
above will produce an error and have no effect on outHumidity (which
arguably is what you want)).
Gary
On Sunday, 27 December 2020 at 21:22:34 UTC+10 [email protected] wrote:
> Let's say I have two sensors, "outHumidity" and "extraHumid1".
> "outHumidity" ist a sensor that delivers data very reliable but not very
> precise measurements, it's the stations built-in sensor.
> "extraHumid1" delivers data a little less reliable, but very precise
> values. It's a custom built ESP8266 using a SHT35, sending data over MQTT.
>
> Is it possible to prefer extraHumid1 over outHumidity, if there are
> extraHumid1 values in the archive Interval? If not, use outHumidity?
>
> Something like
> [[Corrections]]
> outHumidity = if extraHumid1 == 'None' outHumidity else extraHumid1
>
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/f3ea66f8-36e2-4b3f-86ca-a36ab3dd0259n%40googlegroups.com.