Hello,
I try to create a sensor with a power value from yesterday (-24h). But it’s empty in HA.
- platform: influxdb
host: localhost
username: homeassistant
password: homeassistant
queries:- name: Min for last hour
unit_of_measurement: ‘W’
value_template: ‘{{ value | round(1) }}’
group_function: min
where: ‘“entity_id” = ‘‘stroomverbruik’’ and time > now() - 24h’
measurement: ‘"%"’
field: value
database: homeassistant
- name: Min for last hour
Query:
SELECT mean(“value”) AS “mean_value” FROM “homeassistant”.“autogen”.“wat” WHERE time > now() - 24h AND “entity_id”=‘stroomverbruik’ GROUP BY time(:interval:) FILL(null)