Entities renaming to _2

I’m fairly certain others have experienced this, but searches aren’t returning anything.

I use the Home Assistant MacOS App to monitor my Office iMac. For example, I override lights turning off if the binary_sensor.office_imac_active sensor is on. Fairly regularly, however — and I’m guessing maybe due to the app updating itself — I find all of my sensors re-created with a _2 in the name which wrecks my automations. The fastest way I’ve found to reliably put things back to rights is to directly edit the core.entity_registry file, but that’s a hassle.

Does anyone else experience this same issue? What’s your approach to fixing it?

Just rename the entries in the UI. I get this occasionally with one of my MQTT integrations when it rwsrt and forgot to tell HA it did so it happily creates new entity_ids for me (how helpful)

Don’t go into the registry unless there’s ABSOLUTELY NO OTHER WAY that’s how you get an HA install that won’t start.

If I recall correctly, this isn’t possible because the old entity names are still in the core.entity_registry file.

The old ones are still there in the list. That’s the whole reason you got _2 entiies.

Just rename the orphaned ones to _old the rename the others

Seems like I tried this but ran into a problem…? I’ll give it another go next time the problem occurs. Thanks.

1 Like

It happened again today. The solution was to just delete both devices – the old one with the right entity names as well as the new one with the incorrect entity names. When I made the MacOS HA App active, Home Assistant saw the device and immediately recreated all of the entities with all of the correct names. I didn’t even have to restart HA.