Hi
I have an utility meter which records the on time of a switch. The state gets reset every day (at midnight) Everything works as expected.
But for some reason, the recorded value has in one day a wrong state.
I can correct this in the sqlite db, however the sensor on my card then adds the difference I have corrected to the current day automatically. From where gets HA this value? I can not find any hint in the db nor in the core.restore_state file.
The state in the staistics table is correct, but the sum just jumps to a higher value.
Go to Developer Tools → Statistics. Find your utility meter sensor and click on the ramp icon to the right of it. Navigate to the time the error occurred and delete the value.
Thanks for the answer. I found there a value which is not correct. From where are these values? They are not from the DB. Is there any other location where HA stores that?
This can somehow not be the case, because I have deleted the states for the entity used here and only kept the statistics data. But still I saw the values under “Developer Tools → Statistics” for this entity. And more strange, there the values are shown in 5 minutes steps whereas the states table records it on change or every minute and the statistics logs it every hour.
However I could solve my problem with setting the value in “Developer Tools → Statistics”. Thanks again.
I assumed that, but the 5 minutes showing in the statistics edit dialog is not present in the statistics table.
The statistics table shows me only that between 10:00 and 11:00, the switch was on for 0.85 hour:
But in the “Edit” dialog, I see exactly when it started and for how long (in the mentioned 5 minute steps)
Is this calculated by HA? How does it know when the start was or if there was a gap within one hour?
It is not a problem related to the issue here, it just interests me…
the table is statistics_short_term… it keeps the statistics in 5mins step for (default) 10 days.
I should have known this as I already used it before…
the table is statistics_short_term… it keeps the statistics in 5mins step for (default) 10 days.
Are you sure? I’ve been looking in that table for values that are shown in developer-tools/statistics , but can’t seem to find those…
Trying to find the location in the database so that I can do a search for specific (too) high values that I might’ve missed, but can’t find those 5-minute values anywhere (also checked in other tables).