Good Question. Since I am currently only thinking about how everything *could *work out, I can't answer this at the moment. But I guess my question is answered. If there would be an error, how would one handle it? Or is a "nasty" log an no effect on "outHumidity" all? gjr80 schrieb am Sonntag, 27. Dezember 2020 um 12:50:51 UTC+1:
> 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/e733e08f-a8f6-4825-8821-4c1c7acf998en%40googlegroups.com.
