I looked into the definition of class ValueTuple in units.py. If you think 
of 2 values of group_time and you subtract them, then the result should 
have another unit (second instead of unix_epoch) and unit group (
group_deltatime instead of group_time). But __sub__ preserves the unit and 
unit group in this case, too.

Tom Keffer schrieb am Samstag, 9. August 2025 um 23:15:06 UTC+2:

> Thank you! Turns out, this triggers a bug. See issue #1009 
> <https://github.com/weewx/weewx/issues/1009>. Fix in commit 153c74e 
> <https://github.com/weewx/weewx/commit/153c74efa8c71af2e3e696c4e2d6492a6fe23bb7>
> .
>
> Is there any particular reason why you are specifying that delta times 
> should be in hours? That's not normally something a user cares about.
>
> -tk
>
> On Sat, Aug 9, 2025 at 8:09 AM 'Werner Krenn' via weewx-user <
> [email protected]> wrote:
>
>> With $sun_visible_change.long_form I always get 0 minutes, 0 seconds.
>> I've now figured out the reason for this:
>> weewx.conf:
>> [StdReport]
>>  [[Defaults]]
>>    [[[Units]]]
>>       [[[[Groups]]]]
>>           group_deltatime = hour
>>
>> With this setting, I get the correct display for sunshine duration and 
>> rainfall duration in hours
>> but not for $sun_visible_change.long_form.
>> How do I get the correct data for $sun_visible_change.long_form ?
>>
>> -- 
>> 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 visit 
>> https://groups.google.com/d/msgid/weewx-user/2a931076-291a-48e3-96ec-729c6c408d32n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/2a931076-291a-48e3-96ec-729c6c408d32n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 visit 
https://groups.google.com/d/msgid/weewx-user/45000e48-dada-4e17-ad29-5581df93c20dn%40googlegroups.com.

Reply via email to