Entity Mass Rename Entities

Hello people,

I would suggest a mass renaming of entities.
I see myself spending a lot of hours renaming diferent diagnotics entities from different devices.
Il would be nice to have a quicker way to rename entities.

Let say under the filtering of entities you would have a rename button there on the selected entities and then a pop-up with jsut the name of each entities and change them one by one and then apply.
No more time spending entering each device copying paste name and renaming.


So changing the name of a device does a mass remane of entities within the device. At least for any entities that using the default name, if you customized the name then it won’t change it. Additionally it asks you if you want to update all your entity IDs. If you say yes then it updates all your entity IDs with the new device name as well.

I’ve never really found myself copying and pasting names across devices though. Usually any time I want mass renaming it’s to replace the old device name with a new one. Can you give some examples of when you’ve had to copy names to entities across devices?

my wife bought a new iphone
i reference it in so many places, nodered, lovelace, automations etc
it has many many entities of battery level, location etc

its now been assigned into home assistant as xxxx_2 so i need to go through and rename the old phone entities to xxxxold and then rename xxxx_2 back to what the first phone was.

what was wrong with a file you could search and replace.
theres no easy way to do this

I wrote a script to do mass renaming using regular expressions. Maybe this helps.

I’ve got it installed and ran a search. I assume there’s no way to include disabled entities? Out of site out of mind, but they’re still floating around the system and would cause an error if you attempted to reuse the name.

Unfortunately not an easy way, no.
The script uses the REST API Endpoint /api/states which only returns enabled entities.