Strange behavior in automation and device control

Hi all,

I have observed a strange behavior yesterday.

After I have integrated some Homematic devices and deleted some Zigbee devices I have also created and deleted automations.
First I noticed that one automation that I had previously deleted, appeared with a red icon. Two other deleted automations appeared as disabled.
All three could not be deleted. “not in automation.yaml”.
Two restarts of HA (one with reboot) did not help.
At least I noticed that also switches were not operable.
When I turned them on they were immediately switched of, others switched off were turned on again.
I then did a restart of HA in safe mode with a lot of error messages.
After a normal restart with reboot the system was in a normal state.

The problem is not reproducible, however I have observed the strange switch behavior at least 3 times. That was solved after a normal restart.

Cheers

Yup, seen that before. HA sometimes gets a bit confused after adding/removing a bunch of stuff. Safe mode usually clears it, but yeah, the ghosts-in-the-machine vibe is real. If it keeps happening, try clearing out .storage files carefully (backup first obv). Or maybe it’s time for a fresh config cleanup.

What do you mean by a “fresh config cleanup”? I have some ghost automations that are nowhere to be found in my config so am looking for any possible way to fix it.