Hi everyone,
I want to collect below stats from 22:00 - 06:00 using the history_stats platform. I want it to reset every night though, not sure if it does that and i can’t figure it out from the docs.
If you want it to reset at midnight that is going to be in the middle of your collecting interval.
Fortunately (or unfortunately) that is what it is actually doing:
At the moment it shows data from 10pm to midnight.
As once you cross the midnight boundary the start date in now() changes to the new day. So it will then be measuring from 10pm today to 6am tomorrow (which you don’t have data for as it is in the future).
I meant that i want the value to be 0 and start every night collecting the stats again.
So, it seems the better way for me currently is to collect all the history, and reset the history_stats sensor by automation (i want the data to be available throughout the day).
Not sure how to set a sensor (as i would for example in developer tools) in the action part of a automation though.
I haven’t decided on the value yet, it could be anything. Let’s say it would be 10pm.
The problem is if i do it this way the data actually becomes unavailable from the history recorder, which i didn’t realise, i thought it would just stop recording (i guess it does, but if i refer to the sensor i just get a nice N/A in my graph).