I have just installed ecobee thermostats in my house and I am trying to graph the total run time each day. I have tried a statistics sensor but the problem is when I create a sensor to track run time, it logs the latest value all day and then when I go to graph the run time it adds up ALL the values.
It’s easier to explain with an example. Suppose that the heat for a zone runs for an hour at 10 am, an hour at 1 pm and an hour at 3 pm. If I look at the graph it will show me over 6 hours of run time because it adds up all the sensor values for the whole day.
How do I get it to just count the total run time instead of adding up each time the history sensor gets logged?
I should explain that I am not talking about the built in history graph but rather I am using the apex chart card loaded through HACS. The built in history graph just shows the run time increasing all day which is also not what I want.
I use a history_stats sensor entity. It’s basically a copy/paste of the example code in the docs. Keeps track of how long some entity has been in the desired state.
That works fine to show the increasing time during the day. What I want to do is to have a bar chart where each bar shows the total run time for a day. I would like to show maybe a week’s worth of data.
The Apex chart card seems pretty flexible. Maybe you can configure it to show the last value of the day, or the maximum value during the day? My sensor is being pushed to InfluxDB and in Grafana I just have a query for the last value of the day.
Thanks I didn’t notice that video, I just watched it and it seems like what I want, key is the ‘last’ keyword he uses. I’ll try it when I get home. Thank you again.