Hi,
So there has been many things written about replay from history sensor, however all of those are touching on using “ON” state, and nothing more. There is a lot of kung-fu with node red etc … But can somebody please explain how to for example use history sensor with basic automation script firing every minute (or other interval), to set light to given state, brightness and colour ?
A ready script would be nice, but I think we all would like to learn more about history_stats and how to use it for other things and documentation is not very helpful here.
You could use an SQL sensor to get the state of an entity x days ago (where x is less than your purge_keep_days, which is 10 days by default). You would need one of these sensors for every entity you want to control. Then the automation would look like this: