It would be nice to be able to manually reset history stats sensors.
Use case: I total the hours my HVAC system has run with a history stats sensor. When it hits 250 hours I get a notification to change the filter. I’d like to be able to reset the hours counter once I’ve changed the filter to restart the count.
Unless I’ve misunderstood something along the way statistic sensors are calculated from the database and history stats are a just a cumulative counter, no? That would be quite the refactor!
Sounds like he just needs to be able to specify start/end times for the statistic sensors to meet his use case. I just need to be able to reset the history stats to meet mine
Yes, history_stats-like durations on statistics sensors would work just fine for me. As would statistics-like analysis on history_stats sensors. But then they start to look remarkably similar. Maybe it isn’t so much a refactor as making either one do both things and deleting the other? (Or aliasing it, to avoid breaking things:-) He says, knowing almost nothing about the innards of home assistant and how difficult this would be.