Algo Timer

your welcome.
it sometimes just takes some other eyes to look for the problem :wink:

Thanks for the help. Glad @smokes2345 got this working!

1 Like

So here’s something closer to what I had in mind originally. Its capable of loading data from the hass db if it’s configured to do so, but otherwise just uses the information at hand. There needs to be some sort of jitter control put in as there seems to be a significant amount of time between the ‘turn_off’ event being issued and the actual state change. So when I have time I plan to implement some sort of control to account for that, but otherwise this is a pretty much fully baked version of what I had in mind originally. @aneisch I started with your class, but i’m not sure it’s recognizable at this point :slight_smile:

With the latest iteration, each average is rounded to a minimum/default interval. This should account for any jitter or latency.