How can i change this to give me hourly stats, 12-1, 1-2 etc so I can graph it like the Netatmo graph showing how many minutes each hour the heating is ON
Thanks, is there any quick way of doing hourly without specifying 24 start and finish times? I’d like a graph something like this one on the Netatmo cloud
Did you find a solution for this ?
I’m looking exactly for the same function I would like to display the time the heating was on per hour in grafana… the history state sensor is a good start but I’m really looking for the per hour option.
If you use influxdb and grafana, you can do this easily… and you can store/analyse several years worth of data on a normal hard drive without having slow downs. I know that isn’t ‘history stats’. So OT, but figured I’d mention it as a solution to see the desired graph.
A hint… use field(value)/integral/cumulative_sum/math(/1000) on the heat or cool entity to see cumulative on time in seconds (influx sums over milliseconds)… /60000 for minutes, /3600000 for hours. This is also useful for graphing kW-hr from power data, and other integral type graphs you may want.
How do you get the graphs in influx/grafana without the history graphs ? I have both running but wasn’t able to get the hourly data from the climate sensors.
History and influxdb are totally independent of each other afaik. History graphs usually depend on the stock sqlite database, or mariadb. Influxdb and grafana can work without any of those configured.
Edit… here’s a pic of my influxdb notes if they help
Hey I just played in grafana and see the useful state under the entity “thermostat_mode”, in the field “hvac_action_str”. Unfortunately this isn’t binary data, but a string (heat/cool/idle/off).
My heater has been turned on and off, and cycled between idle and heat a few times today. Unfortunately when it is turned on/off it spits out a 2 or a 3… normal idle/heat shows binary (1=heat, 0=idle). So those other values are screwing up the integral. Perhaps we could prod the ha dev’s to sort of go back on the latest climate component changes, and bring back some separate cool/idle and heat/idle binary entities for us to use here.
Otherwise, yeah it looks like maybe a template may be needed after all to graph on times in grafana. Not the end of the world, but imho not as ideal as having the entities added with the component.
Many thanks guys. I’ve not gotten round to trying anything I’m too busy at work with Coronavirus preparations but it looks like something I can work with.