Can you help me chart an energy HA statistic in Grafana?
My set up is HA → InfluxDB → Grafana
I have working time series charts in Grafana for temperature, humidity and power sensors.
However, some items I want to chart are only available as HA statistics. They are external statistics exported by Octopus Energy HACS integration previous consumption and export sensors, which are broken down into hourly chunks. When I try to chart them in Grafana it says ‘No data’.
I can successfully chart the HA statistics in the following HA statistics graph:
Here is my attempted Grafana query which results in ‘No data’:
SELECT difference(\"value\")
FROM \"autogen\".\"W\"
WHERE (\"entity_id\"::tag = 'octopus_energy:electricity_xxx_xxx_export_previous_accumulative_consumption')
AND time >= now() - 7d and time <= now()
GROUP BY time(1h) fill(none);
SELECT difference(\"value\")
FROM \"autogen\".\"W\"
WHERE (\"entity_id\"::tag = 'octopus_energy:electricity_xxx_xxx_previous_accumulative_consumption')
AND time >= now() - 7d and time <= now()
GROUP BY time(1h) fill(null)
Where am I going wrong?