Fixing Home Assistant energy dashboard data glitches
I have a few glitches in my Home Assistant energy dashboard (home-assistant.io) that I’d like to fix. Here I document how I achieved this. Mostly the problem was Home Assistant not capturing the sensor data for a while, and when it picked up it showed a big delta.
Approach 1 - via SQLite database ¶
See details here (home-assistant.io), I didn’t check this for complexity.
Approach 2 - statistics fixer ¶
It turns out there’s a simple approach!
A feature has been added recently to fix outliers. Go to Link to Developer Tools: Statistics (home-assistant.io) to search for a wrong number and fix it. (source (home-assistant.io))
Good to note:
Statistics are delta’s, not the total from the sensor (source (home-assistant.io))
Fixing data ¶
I keep an InfluxDB database with my precious data, so I can fill the values back in using a few queries:
select first(value)/3600/1000 from energyv3 where source='kaifa' and time>'2024-03-01T12:00:00+01:00' group by time(1h) order by asc limit 10 tz('Europe/Amsterdam')
select first(value)/3600/1000 from energyv3 where source='kaifa' and time>'2024-02-17T10:00:00+01:00' group by time(1h) order by asc limit 10 tz('Europe/Amsterdam')