Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 99036

Help with total time state = "on" influxdb

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 99036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>