I’m getting the occassional wrong result when calculating the difference between 2 datetimes - exactly 1 hour too long. This is what I’ve got:
{{ state_attr('sensor.slwrestrictions','1stfrom')}}
{{ state_attr('sensor.slwrestrictions','1stto')}}
{{ (as_timestamp(state_attr('sensor.slwrestrictions','1stto'),0) - as_timestamp(state_attr('sensor.slwrestrictions','1stfrom'),0)) | timestamp_custom('%Hh%Mm',true) | replace('0','') }}```
with this result:
2023-09-05 02:59:58.358267+00:00
2023-09-05 04:19:42.885771+00:00
2h19m
Pretty obviously the difference between these two is 1h19m not 2h19m. Can anyone spot why this is?