Fix bad value in new Energy dashboard

I have problem with one value in new extremely great energy dashboard.

When I changed state_class from “measurement” to “total_increasing” in two of my sensors which I use to measure energy, HA count a one hour consumption at almost 5 MWh;) I change state_class to measurement again and also changed every record of that entity from “total_increasing” to “measurement”, After that, values in next hour back to normal, but that one hour Is corrupted.

I want to fix that mistake directly in database. I’m sure that values (shows on the graphs) is cashed or stored somewhere, but I can’t find where:( I’m using HA installed on VM on my Synology and MariaDB, and phMyAdmin plugin to manage DB. Any help?

You need to edit the homeassistant / statistics table in the MariaDB database.

Thank You:) I found that table, but there was so many records… :wink: I’ve help myself by r estore a database from last copy (16h before accident). I lost my details daily data, but source of data remember the sum of the value fomr all day. In the end of the day it won’t be so bad:) Thanks for help, and the end conclusion is: make a regular copy:) It could help!

How can I do this? I cannot use the phpmyadmin addon, because I get an error “Got unexpected response from the API: Service not enabled phpmyadmin”.

I have a similar issue. But for the life of me I cannot find this wrong entry. This is from a specific date. When I got to that date in the statistics I see nothing wrong.