Help! History no longer working after restore from snapshot

Help! I’ve restored from a snapshot and am now having trouble with my history, and consequently, my displayed graphs.

The issues started when I tried to get rid of an integration that I stuffed up. I created a Unifi/Ubiquiti integration and then realising I should have set it to a static IP, recreated it. I ended up with 2 integrations. I searched for a way to get delete integrations and couldn’t find one, so I restored from the last backup.

After solving a problem with getting SmartThings Integration again, I then realised that none of my Temperature graphs worked anymore. I looked at the History and there was nothing there. Thinking that I needed to give it time, I left it overnight … and it’s still not there.

Has anyone come across this. Does anyone know how to fix it?

Edit: I’m on the latest version of HA if that helps?

Stop home assistant.
Delete /config/home-assistant_v2.db
Start home assistant.

Thanks. I’ll give that a try when I get home from work. Fingers crossed.

That should come with a warning that all previous data will be lost! (Although perhaps it is anyway, is there an sqlite repair tool out there anywhere?)

That’s ok. I can live with losing the existing history. After three days, I’ll be back to where I was.

It worked, by the way. Thanks @tom_l. :slight_smile:

2 Likes