Bogus triggers in the logbook?

I was messing with my configuration, including probably editing files in .storage that I shouldn’t have, and have ended up in a situation where the logbook contains completely random and unrelated triggers for binary sensors for all new events.

For example, I have a motion detector that is only ever triggered by exogenous motion, but when I look at the sensor history I get messages like: “detected triggered by state of front door was closed”, or “became unavailable triggered by state of camera-1 was disconnected.”

An even more ridiculous example was when homeassistant decided my front door “was closed triggered by state of OpenWrt router packets/s changed to 11.8647872843608”. Needless to say, I closed the door myself, and not in relation to my router’s forwarding rate.

I’m thinking maybe homeassistant is just taking any random state change that happened recently and deciding it is the cause of the next state change, but it’s really quite annoying. Does anyone have ideas on how to disable this behavior?

Restore the config directory from a backup from before you messed with .storage.

1 Like

Yeahhh… After that… All bets are off. Who knows whats broken.

Best bet is to rollback to a configuration before whatever that was happened?

Is there any way just to blow away my history, but keep my automations and lovelace configuration?

Sure but if you have messed up your .storage registry this will probably keep happening.

To delete your history simply delete the config/home-assistant_v2.db file and restart.

This will delete all history including long term statistics that the energy dashboard uses.

Sadly, I went and restored a backup from a couple of weeks ago when I was still running 2023.3, and I’m still having the same problem. I guess the next step is to try downgrading from 2024.4 back to 2023.3…

Well, the problem goes away with 2024.3. It looks like printing what triggered a state change is a new feature in 2024.4, and it’s falling victim to the post hoc ergo propter hoc fallacy.