Hi, I’ve fucked up … totally aware of this … no question … all my fault, but maybe somebody has an idea how to fix this.
Background: I really like my long_term energy data and wanted to make sure that I have a backup. About a year ago (or maybe 2) I created a script that would open the sqlite database from homeassistant, export all entries of the four statistics* tables to a backup database.
I’ve ran multiple tests at the time on some freshly started homeassistant docker container and just copied my backup table into the installation and it worked flawlessly … all longTerm data showed up … nice … so my backup script was saving all the data once a day in my backup database on an external NAS
For some stupid reasons I’ve lost my current database but wasn’t to worried, knowing that I have my backup. Finished restore → started HA → check the energy tab and … tata … all good …
changed to “year” overview and saw: damn something is wrong (what used to work before):
as you can see all data BEFORE march 2023 is accumulated and displayed on the 2nd of march 15:00 … for what ever reason. I’ve checked the backup file and the timestamps are all good (date back to Oct 2021).
I guess something in the database structure has changed leading to this issue, but can’t find the rootcause.
Is anyone aware how to fix this? I’d really really love to get my data back