OK so with plenty of help from the community, I setup two history_stats sensors for my cooling system. I wanted to display on a card the total runtime for the day, and the number of times the system kicked on. I display this on my Dashboard and can monitor it throughout the day. Works great.
Now what I want is to display on a card, the Average Runtime per cycle for the PRIOR day which ultimately, I can then hopefully derive a trend from.
My history_stats sensors reset each day using today_at() and a Duration of 24 hours.
sensor.heat_pump_runtime_today_cooling (unit of measure = Hours)
sensor.heat_pump_times_on_today
So if I trigger an automation at say 23:59 to calculate the average runtime per cycle for the day just about to end, how would I do that?
Example: if at 23:59, the system ran a total of 5 hours (300 minutes) and cycled on 10 times, that’s obviously 30 minutes per cycle. I want to display that on my Dashboard…
//Brew