How can I add the same device again from anotjwr integration so I don't need to redo all my automations

Hello.
I have about 10 devices paired to my dirigiera hub.
Because it got a different IP from DHCP Home assistant decided that it no longer exists. Sad but true.
Now I have to do a factory reset of the device, and I was thinking that that will require to readd all the devices, and in that case why not do it directly ok ZigBee2Mqtt. But I don’t want to scan all my automations and all that stuff.
Can I add the devices to ZigBee2Mqtt and give them the same name they had previously?

Unfortunately nothing like this exists at the moment. When you say “devices”, if you mean entity_id, just rename the new entity with the old name. If you mean device in terms of HA device, there’s no replace method at the moment, even more so if they come from different integrations with different features.

Whatever makes it easier to not have to deal with rewriting all my automations.
Usually I only care about one “feature” of each device. For example, for door open sensors, I don’t care about its battery status, internal temperature or quality of connection, just the boolean one that indicates if it is open or closed. If I can achieve that renaming the entity_id, then that is what I’m looking for.

That will work as long as you didn’t use device triggers, device conditions, or device actions.

Which I do.
What should I do in that case? Edit the automations even if it is to add the same entity ID?

If you use those types of actions, you have to redo each one. It’s one of the main reasons why veterans recommend against device triggers, conditions, and actions.

And what do veterans do when they want to react to a state change or conditionally run something depending on a device state?

You just use state based triggers, conditions, or actions. IIRC they are listed as “entity” in the UI.

1 Like

Maybe that is where the root of my confusion is coming from? I indeed use State triggers and conditions, and, as you said, they are somehow listed as “entities”. A lot of different and confusing naming schemes if you ask me

It’s reasonably logical, it’s just new to you. You’ll pick it up quick enough.