Auto-rename entities on automations, scripts and so on

I don’ t know if I’ m right to post here but…
… is it possible to introduce a feature that is able to change ALL the name of the entities that I change in all the scripts, automations, others… ?

Because, when I’m change the name of a device, is annoying and very difficult to remember and change all the name of the entities in the different automations, scripts or others…

Is it possible to introduce this feature?

Thanks!

p.s.: sorry for the wrong post on the other 3D

I’m pretty sure you mean entity_id, not name as changing the name has no effect in your automations and scripts.

You can use the find & replace function of a text editor like VSCode to do this across all the files in your config directory.

Don’t forget to vote for your own request.

If you have the Spook add on, it will helpfully tell you automation, script, dashboard, and probably more (areas? groups?) that your now defunct entity ID appears in if you change it to something else, making it easy to track down all the places you need to change.

If you change the entity_id, the history starts over. Just a warning.

Just did this recently after I cleaned up duplicates (_2, etc). It was quick and painless.


While I do think some bulk entity renaming features via the UI would be nice, I certainly wouldn’t want to “automatic”.

I’ve used this in the past, but it took a little work to understand how to use it.

Admittedly, it’ll take a moment to sort through that conversation, but it’s a lead if someone was looking to bulk edit entity_ids.

Edit to add - I’m realizing the second half of that is not directly related to the FR.

Thanks for your time.

Consider that, for example:

  • I have a device called “Garage” that is a light
  • I add another light
  • I need to change the first light name in “Main Garage” (the second one should be “Secondary Garage”)
  • now I have to change ALL the entity parameter “light.garage” in “light.main_garage” for *ALL my scenes, scripts, automations, …

So, I know that there are a lot of ways to do that but my idea is that would be very important that in HA this feature is totally automated and integrated on the SO.

(sorry for my bad english and for my bad explanation)

The trouble with it being fully automated is if you are intending to change a device to something else, and don’t want it to accidentally break all your scripts and automations. Maybe the UI could offer to make updates elsewhere.

I don’ t know this tool… I have to study it
Thanks

BTW consider to have 10-12 automations involved (or more) and for each automation maybe 3-4 points where the entity is involved… it’ s a hard work to change manually…

So, if that is automated…it’ s better…

Also, not all the installation (I have raspy3) support VSCode

Just an idea I’d you can’t run vscode on the server itself…

Use the Samba add-on, and run vscode on your workstation to make the changes vs tracking down the many places it’s referenced.