Thank you Gary. I use "prefer_hardware", so I am very confident the 
expression will do what I want to achieve.

gjr80 schrieb am Sonntag, 27. Dezember 2020 um 13:23:07 UTC+1:

> If extraHumid1 and outHumidity are not in that same loop packet then a 
> correction expression will have no effect on the loop packet. If you are 
> using hardware record generation then the correction will be applied to the 
> archive record as well so that may do what you want for archive records. If 
> you are using software record generation then no corrections are applied to 
> archive records.
>
> Gary
>
> On Sunday, 27 December 2020 at 22:14:36 UTC+10 michael.k...@gmx.at wrote:
>
>>
>> But thinking further I have another question: will [[Corrections]] work 
>> with every loop package or every archive interval or both? If on every loop 
>> package is archive value computed from the loop data a mix of both sensors, 
>> since the sensors won't deliver their readings with the same loop package? 
>> Or won't outHumidity be affected at all, because the never is a extraHumid1 
>> value available?
>> michael.k...@gmx.at schrieb am Sonntag, 27. Dezember 2020 um 12:58:47 
>> UTC+1:
>>
>>>
>>> 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 michael.k...@gmx.at 
>>>> 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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8de9a1f2-e70e-4010-a8ff-31f9e92ed07fn%40googlegroups.com.

Reply via email to