@yonny24 wrote:
Please I need some help with influxdb addon DB- I need the total time of a device “on” state per day or month. Using sum(value) but the integer being returned does not make sense. I’m looking to return the total times (in hours or mins) from state - “on”. What unit is this returning? 4.0 for today for example doesn’t make sense. Thanks!
SELECT sum("value") AS "time" FROM "homeassistant"."autogen"."state" WHERE time > now() - 2d AND "entity_id"='51746580840d8e63e756' GROUP BY time(1d) FILL(null)
Posts: 1
Participants: 1