High CPU Usage after reinstall/restore image

Hello,

I do not need help, but was wanting to share a solution I discovered while fixing another issue.

I had Home Assistant in docker on LUbuntu and reloaded my computer with Debian and Home Assistant Supervised as per the WiKi, I then restored the partial snapshot from my old install.

I noticed a pattern that a few hours after a starting/rebooting Home Assistant the CPU usage would climb from 8-10% up to 30-35%.

What I also noticed (and did not corelate with the CPU usage) was that my history was no longer working. After I removed the database and let home assistant create new, it not only fixed my history but also stopped my CPU usage issue, it is now staying at 8-10%.

At least for HA Supervised on Debian, you simply delete the db by doing this:

  • SSH into the computer hosting home assistant (so the OS, not the HA instance)
  • sudo ha core stop
  • sudo rm /usr/share/hassio/homeassistant/home-assistant_v2.db
  • sudo ha core start