I’m trying to visualize the status of several door sensors.
Therefore I want to have a panel that shows me how many of the doors are open.
I already have a query to get the last status of each sensor in a table by using this query:
SELECT last(“status_int”) FROM “sensors” WHERE $timeFilter GROUP BY “device_name”
If the door is open, the variable “status_int” = 0.
How can I count the 0s in this table and visualize it like: 3/15.