Replace defective hardware

Hi!
I recently set up HA (coming from another platform). One of my switches (homematic sw1) died and I replaced it with a shelly 1 mini.

In my NodeRed functions and rules and in the scripts, automations etc. it is always referred to the old device. What is the smartes way to change this to a new physical device in case this happens again or should I named the device differently from the beginning - is there some abstraction possible?

Thanks for your help.

BR
SJ

I think I already “replaced” dead Devices by just applying the old name to the new devices…
THEORETICALLY:

  1. write down all entity names of the dead device
  2. Delete the device/entities (dont deactivate - i mean it: delete them)
  3. go to the “new” entity/device that replaces the dead/old device/entity
  4. Open up the entity → Cog →

Change Entity ID accordingly

Dont know it this creates other issues and if this is recommended to do, BUT it is possible.
And since I dont use NodeRed I dont know if NR does solely need the Entity ID or another “unique identifier” for the Entity.
But theoretically you could try I guess. :man_shrugging:

Don’t ever use device automations.

See: Why and how to avoid device_ids in automations and scripts

1 Like