ZHA: renaming device breaks automation (w/ screens)

When I rename a device, any automation referencing entities of that device will break. Is this a bug?

The entities are in fact renamed correctly, but automations that reference those entities are not updated. For example:
Let’s say I have a smart plug called “P V2 ladeblok Au3 alleen router” in ZHA:

and an automation that references the power entity:

When I rename the device to “P V2 Au3 router only”:

I get the option to rename entities:

I want that, so I click Rename. However, when I go to my automation, the reference is broken. The automation now lists the old Entity ID, not the new entity name.

Is this a bug?

Nope. Your automation is stored in a separate file and has no idea that the entity name changed.

You will need to update your automations separately if you’re changing the entity names.

A quick find & replace in automations.yaml should make this a 2 minute job.

1 Like

Dear @ShadowFist ,
Thank you very much for your Quick reply and Advice!

1 Like

Hi Peter, if it’s solved: please take the time to mark the solution as the answer, you do that by selecting the three dots under the post:

image

Then select the check box:

image
By doing so:

  • this thread can be useful to other users as well (this thread comes up as solution when starting a thread which is similar to yours).
  • this prevents that someone else steps in trying to help

Thanks for giving back to the community! :+1:

2 Likes

Done. Thanks for educating me. :+1:

2 Likes