Automation not work after z2m device repairing

Hi everyone,
I’ve encountered an issue with HA and z2m: sometimes I need to re-pair a device (Bticino K4027C roller shutter controller) because it becomes unavailable on the network. When I re-pair it, z2m automatically recognizes the device with the previously assigned name since it has the same address. HA also starts working again through the widgets on the dashboard, but this does not happen in automations. I don’t understand why.
Note: When I open the automation YAML, I don’t see any references to device IDs, only the name.

thank’s everybody

Please show the yaml of one of the automations, so we can take a look.