WTH there is no easy and automated way to replace devices

So, let’s imagine you have a zigbee bulb which is linked to some automations, scripts and scenes and also is displayed is several dashboard cards. One day is blown and you have to phisically replace it by a new identical bulb (or even similar).
You then have to pair it with the zigbee coordinator and there you have a new entity available in HA.

Current situation is you have to remember where the entity is used and go automation by automation, scripts, scenes, dashboards… and manually change the device. Imagine that with hundred devices which could stop working at any moment.

Wouldn’t be great to have a replace button in a config tab where you point the old and the new device and HA automatically replaces the entity with the new one and even purges the old one?

That is why you don’t use devices, you use entities.
Entities can be renamed and reused easily


This makes sense to me now, but even a bunch of reading before I started my Home Assistant journey 3 years ago I did not understand this and built a bunch of things with devices.

Still today I wish this feature existed so that I could just say tap a “replace device” button and it automatically renames it, or even better pairs and replaces at the same time.

This would make it easier in general and removing steps of renaming. Much more streamlined. (or if you’re in manufacturing “poka-yoke”)

1 Like

It would be nice to see somewhere (under System → Repairs?) all entity ids that are used somewhere (automation, templates, UI) but missing and the possibility to “assign” one from the available ids that are not in use already.


Too bad “device” is the default that the automation editor automatically selects for a trigger. It it the worst choice in most situations.


Easily? My problem occurs when…

A zwave switch (switch switch.livingroom) is replaced

New device doesn’t take same entity name because maybe I add second switch (switch.livingroom2) or maybe I decide to change name scheme (switch.livingroom_north).

If I have switch.livingroom in (x6) automation, how do I easily change this other than go to each. I was wanting easy way to change all

This is what I get when I start a new automation.

What version are you on?

I would say all text editors have a search and replace.

Of course search and replace in yaml will work but the point here is to do it in the UI as a point of improvement for the less technical crowd and just to make things easier

Also that involves searching automations, scenes, what about groups.yaml


Sorry I wasn’t looking for a solution in my original post .I was providing a use case, and example of where this would be useful

Same as this?

1 Like

Ah right, they changed the editor. But device is still the top choice and the worst pick.

No. They are listed alphabetical.
In triggers the first one is calendar, Condition has and, and lastly actions is call service.

Ah, in Dutch a device is an “Apparaat”.


So there is a way you can currently do it. Great! But… easy and automated?

Let’s add the case where you have a sensor device which packs with it 4 entities (p.e. temperature, humidity, pressure and battery). If you replace it, then you have to edit the name of 4 entities but before you have to delete the 4 original entities to be able to put the same name in each one.
You either have to remember the original name or take note of them, that’s already a failure point and lots of extra steps which are not fool proof.

Also, when a new user starts creating automations, it’s easier to use devices instead of using entities and then calling different services. If that’s the incorrect way of automating then a warning should be issued but I guess HA team is aiming it’s efforts in making it more user friendly and favour devices, then in some point this would become a problem.

I get your point that is possible, but last months I’ve read in HA blog a lot about streamlining the experience for users, specially newcomers. And here I’m to do my bit :slight_smile: .

1 Like

Kind of related.
In that other thread if I did not misunderstood they refer to problems when changing the name of an entity (or probably a device too).
Here in this thread it’s more about replacing same type of devices (and therefore its nested entities) automatically when prompted.

This is not quite true. Assuming you didn’t unpair the old device, you can see all automations where that device has been included from the device page—making it much easier to go through and update things.

Now device is no longer the default/first option (except for certain languages e.g. Dutch and German) this problem ought to be less likely to occur too.

This may be more related to naming


If I replace device.1 with device.2 or even sensor.1 with sensor.2 my only concern is how to make the sensor or device name match the name of the device or sensor it replaces.


If I decide to change my naming scheme to be more flexible or to accommodate a new setup changing the names in automations/scenes ultimately becomes the concern not modifying automations and scenes

Having the ability to universally change the
Name of device in HA and have it optionally be recursive across all its sensors and locations where the items were used would be nice.

Rename device bring pop up with checkbox

  • apply to entities (default uncheck)
  • apply to device automations/scenes(default uncheck)
  • apply to entity automations/scenes(default uncheck)

NOTE: if box not checked automations and scene is untouched. Adding device/entity with original name replaces the new device/entity in the automation/scene

If name already exist it would initially ask “device.name already exist, would you like to replace it”

Entity name change could have similar

Rename entity bring pop up with checkbox

  • apply to entity automations/scenes(default uncheck)
    If name already exist it would initially ask “entity.name already exist, would you like to replace it”

When replacing maybe it could append “replaced” with time stamp_hhmmss
Device.1 when replaced becomes device.1replaced_081230

1 Like

This is one of those cases where a computer should be good at computer things.

HA knows there is a device, an entity, whatever. HA should be able to “replace” it everywhere it’s used, as part of the functionality of the UI.

“Do everything correct from the start” is impossible for someone new to HA, because you are given so many opportunities to do things wrong, with no clear guidance otherwise. It’s very easy to find yourself a few months or years in and facing this issue in multiple places.

“Replace A with B in all places where A is used” is clear functionality that would solve a very, very common issue without having to dive into a text editor.

The issues that lead to the need for it should also be addressed (see the WTH issue about entity naming in general).


I will point out that at least zwavejsmqtt(ZwavejsUI) now asks you to name devices when adding it.

This was raised two years ago: