Disabled and re-enabled an entity but it disappeared

I have a Aqara motion sensor that I had disabled in the Configuration -> Entities page. However, I have since re-enabled it. However, after re-enabling it, I noticed my automation that was using this sensor was no longer working. When I navigate to Developer Tools -> States, the sensor no longer shows in the list of devices and their respective states. However, the sensor still shows up under Entities and I can still disable/enable it, though it does not seem to make any difference. How exactly do I recover a once disabled entity?

I know this doesn’t answer your question but I have something similar when I deleted a Aqara switch button and only disabled the other entities, e.g. buttery level. When I released this I couldn’t re-add the button so I uninstalled MQTT and reinstalled it, at this stage all the devices came back BUT they didn’t comeback fully as it didn’t reload the switches as switch devices but still allowed me to run the switch services against them, all kinds of missed up.

In the end I ended up rollback to a previous backup to get it all working again.

Super interested in the answer to this as it was very messy for me.

Hi, have you solved this one?

Edit:

Go to /config/.storage/core.entity_registry, find the relevant entry, on the “disabled_by” part change “user” to null. Restart HA. Done.

4 Likes

Yes, removing the entity and restarting HA fixed the problem.