Shelly replacement - any easy way with fix IP address?

I have dozens of Shelly Wifi switches on my farm. From time to time I lose one after lightning strikes. That’s no big deal, I just replace them, update the Mac address on the DHCP server and so the IP stays the same.

Unfortunately the shelly integration uses the Mac address as key which means I need to remove the old (no longer existing) device and add a new one in HA. Which means that all automations break and I need to update them manually.

That’s not really smart. Is there any way to work around this?

Hello Paul,

If your automations and scripts are entity_id based, you can copy an/or remember the exact old entity_id, delete the old entity, add the new entity, and rename it to the old name. After that restart HA, and the new one takes over all the automations, history, everything.

If you are using Device_id’s, nope, all manual…