Im looking for some help with a issue I have with my Home Assistant installation I’ve spent quite a bit of time searching both here and on the internet in general and haven’t been able to find anything obviously close hence my reaching out in this post.
The problem I have is simple. Initially Home Assistant is running fine. All my automation’s work as expected and everything is great. Then after a few days I start to run into a problem with my Input Booleans/DateTime fields.
Basically they don’t remain in their last known state when I reboot Home Assistant (Which I have automated to happen daily) On reboot they revert back to a previous state. I can change them again but on the next reboot they revert back again. For example if I turn and input boolean from off to on, reboot HA, that input boolean is back to off.
My install is on a Raspberry Pi 4 with the 32bit HA image installed. I get this problem whether I use the default Database or if I use MariaDB. Initially I can change my Inputs and they remember their states at restart but after a while I end up with the issue reported above.
If I delete the database and start again everything is fine but sooner or later the problem returns and my Input Booleans do not restart on their previous values.
I have managed to delay this happening by setting purge_keep_days to 1 in Recorder and reducing the number of items Included in Recorder to the bear minimum
When using MariaDB and phpMyAdmin I can see the value of those inputs being saved in the database when I change them (ie turn one of them to off). Looking again at the same entry in phpMyAdmin I can also see them being updated back to the wrong value after HA has restarted
Something somewhere is causing my HA to remember the wrong value after a restart and I’m looking for any advice people may have to help me resolve this