I’ve a basic requirement and here is my expected visualization.
i’ve TV and Sound system connected to HA, ON and OFF events/logs are saved in influx(Grafana) where i can see in bar graphs using sum function and 24h time interval how many hours they are ON per day. what i need is following
so, if we see from above we can easily understand my maximum on interval and time
per day for entire month or year based on time range. (0s has to display as blank and 1s are to be displayed as visual bars)
How actually to plot this kind of chart?
SELECT sum("mean") /60 FROM (SELECT mean("value") FROM "state" WHERE ("entity_id" = 'lg_sound_system')
AND $timeFilter GROUP BY time(1m) fill(previous))
WHERE $timeFilter GROUP BY time(24h) fill(null)
I’ve added a dashboard from Grafana
in Panel options there is something called “Query” where it shows InfluxDB