Delete Energy data for specific date

Hello :slight_smile:

Is there any way to delete from the “Energy” dashboard data for a specific day?
Yesterday I was doing some tests (changing Shelly EM stuff) and for some reason that messed the data.
And I was lookig for a way to delete the data records for the energy on the date 15/02/2022. Example below:


Now I see that yesterday I consumed 1800 KHw… that’s why I want to delete because this will mess with all the measures and avg.

thanks in advance.

1 Like

!! IMPORTANT EDIT!!:
Maybe the better way is to completely remove all your entity from the recorder as it seems to me you have only that single day of your entity record:

Never did this myself but statistics is saved into the home-assistant database.
By default HA uses a sqlite database.

ATTENTION - THIS IS NOT A SUPPORTED PROCESS - YOU CAN CRUSH YOUR HA INSTANCE WITH THIS
Never the less… the only way I see is:

1). shut down HA
2.) create a copy of the original “home-assistant_v2.db”
3.) use something like sqlitebrowser open the database
4) find your entities within “statistics_meta” table and note down the ID

  1. delete the entries for your date & entity_id from the “statistics” table

SOLVED!
In the latest HA build, we have now the Statistics in dev menu that allow us to fix the consumptions that were wrong. https://FQDN:8123/developer-tools/statistics

10 Likes