TL:DR
Does History Stats Sensor always retain the older value if the Start (or End) date lies in the future?
Hi, i am employing a History Statistic Sensor to automatically log how long I am @ work each day. For this purpose, i have 5 sensors (one for each day).
They look like this:
Tuesday:
start: '{{ as_timestamp( now().replace(hour=0).replace(minute=0).replace(second=0) ) + (1 - now().weekday()) * 86400 }}'
duration: '24:00'
Friday:
start: '{{ as_timestamp( now().replace(hour=0).replace(minute=0).replace(second=0) ) + (4 - now().weekday()) * 86400 }}'
duration: '24:00'
However, today (Monday) i can still see the values of Tue - Fri from last week. Is there a way to reset the value every Monday @ 00:00?
If is set the value manually to 0 in the states tool, or via rest api it goes back to the old value with the next update.
Does History Stats Sensor always retain the older value if the Start (or End) date lies in the future?