Count Time of Value above/below a Threshold for a day?

Hey Guys,

I have no Clue on Grafana or anything Home Automation really. I bought a Raspberry Pi and set up Hass.io with Influx and Grafana (and its all running, but I currently only have simple Line Graphs for my Sensors).

What I want: I want to see the daily amount of Time my Sensor values were above and below a certain threshold.

Example: At 5am every morning I take my Plant and take it outside. If the Humidity is too low (below 60%) for more than a set amount of time it got too dry and I have to water it.
At 3pm I take the Plants back inside.

At 4pm I would like to look at Graph and see if I have to water it or if its okay as it is. So any Values between 3pm and 5am should be disregarded. The Graph should reset daily.

Knowing the Amount of Time where it was below the Humidity Threshold would be nice aswell but thats not important.

I would be glad if someone could point me in the right direction for my project. I have read about Flux Queries but I dont know if thats the right path.

1 Like