Reset entity_id after name change

Hello,

In Z-Wave JS (just as an example) I changed the name of a device. This change was promptly reflected in Home Assistant’s friendly_name. However the entity_id remained unchanged. I understand, that in most cases this is desired, as otherwise, you need to adapt all the scripts and UI elements.

However, I want the entity_id also updated. Is there an option to reset the id as if the device was just freshly added to Home Assistant?

The device has 12 entities, so changing them manually is an option, but tedious.

Thanks!

Not really.

It’s my understanding that renaming the device should rename the entities as well if you select that at the prompt.

But it’s very hit or miss whether it actually does it or not and I can’t figure out why it does or doesn’t.

Hey,

  • I did the rename in Z-Wave JS, i.e., out of Home Assistant. There was no prompt about renaming the entity_ids.
  • Tried to rename the device, and yes, it asks if I want to rename the entities as well. But this only affects the friendly_name not the entity_id.

Was this after you already changed it the first time? I believe this prompt only applies to entity IDs that match the device entity I’d at the time.

In any case you will now have to manually rename the entityid in the settings if each sensor etc

I was in fact after the first name change.

Some functionality, such as “Re-discover device” that essentially deletes the device and adds like it is new, would be helpful here.

Just to add a concrete use-case here:

Recently, I moved to a new apartment and for that, many of my connected smart devices were also moved, e.g. “Light Kitchen” became “Light Bedroom”. I changed the name of devices in the e.g. Hue App or the Z-Wave JS UI. However, these changes were not reflected in the entitiy_id and therefore I had to perform these manually for quite some entities.

Something like a rediscover functionality would have helped tremendously here.

:smiley:

I have created a feature request for that, you can vote for it: Reset / Re-acquire entity_id