Grafana request

I would calculate using grafana/influxDb (lastest and using FLUX :frowning: ) Calculate the amount of time for which a light is on.

Someone can give me an idea ?
I added a graph for light on and off… but I would sum every (?) minute of use.
Thank you !


influx query

a starting point Summarize stateduration to have total "on" hours per day - #2 by grant1 - InfluxDB 2 - InfluxData Community Forums