Repalce zigbee device but keep automations the same

Hi,
I just switched from ZHA to Zigbee 2 MQTT, and am repairing all my 20 or so devices, sensors, lights you name it. How can I tell my automations, that these are the same as from ZHA, so I don’t need to manually update all automations? I guess there is some smart way to reuse the old device IDs or so from ZHA?

you can’t re-use the old device id’s. That is the biggest drawback of using device triggers/conditions/actions instead of entities.

if you use entities you can rename the new device entities to use the same entity id’s as the old device but you can’t do the same with device id’s.

okay, I might have confused the terminology. How can I reuse or reassign “Entitiy IDs” please?

If you click on the device you can change its entity_id:

As long as your automations are using entity_id (not device_id) they will then work with the new device because the entity_id is the same as the old one.

You can check your automation to see if it is using device_id or entity_id for the triggers and actions to see if this will work easily.

-David