Save failed: Entity is already registered

Using: Home Assistant 0.77.3

When trying to rename Entity-ID “media_player.slaapkamer” to “media_player.gcslaapkamer” the following error is displayed: save failed: Entity is already registered

I looked everywhere, but can not find where this Entity-ID is stored elsewhere. (searched every yaml configuration file and on the States page) ID “media_player.gcslaapkamer” is not found.

I can change the ID to anything else, but not the ID I want. Perhaps I used this in the past and is it somewhere stored.

Anyone who has knows how to resolve this?

check the entity_registry.yaml file.

This file is nowhere on my system. Other thoughts?

Which is now a JSON file in .storage/

3 Likes

That’s where is was sitting :grinning:

Thank you so much. There where also some other names I did not use anymore. Guessing HassIO did not cleanup those earlier removed names/entities.

Thanks a lot.

How exactly would I edit this? Is it only possible through SSH/command line?

json files are text files… you can edit it anyway you want. I prefer browsing to the file and opening it with notepad++.

Running Hassbian on a Raspberry Pi 3b+.
I’m unable to browse to .storage/entity_registry.yaml via samba, that is my problem :confused:

Then add it to your config for samba so you can

Aha! thanks for helping!
googling “how to add folder to samba share on raspberry pi”
I’ll figure it out eventually I guess

I mean, it’s been a while since I’ve done that because I moved to hassio. At some point, you HAD to setup the configuration for samba if you are using samba. You should already have done this before…

Yeah I did when I got it up and running, for the homeassistant folder, from instructions.
I don’t really have a lot of knowledge in Linux, putty/terminal stuff. :slight_smile:

There’s not much too it. Instead of using the path to the HA folder, use a different path and name the section different. You just need to know the path to .storage. You could just expose the whole pi to share.

1 Like

BTW, I’ve updated and the .storage folder resides inside the config folder but it’s hidden. So whatever you are doing to view your config folder structure, make sure you can view hidden folders.

I added a z-wave sensor, customized it, and then found it faulty so had to remove it from my system. Replaced it with a new one and noticed this same re-naming issue for each of the sensors on the device.

I’ve found the core.entity_registry file and removed all of the sensor references to that old node, but I’m till still getting the same error indicating that the entity is already registered.

Are there any other steps required other than simply removing those lines from the entity registry? Does it require reboot (haven’t yet as I’m waiting for battery powered z-wave devices to connect before I can do that) or something else?

Are you editing the file when home assistant is OFF? That’s the only way to handle changes to that file.

1 Like

ahhhh, that’s probably it. Will try that after I decide to install the next update.

Since my Z-Wave battery powered devices take what feels like forever to fully come back to life after each reboot and upgrade, I limit my reboots/poweroffs to times when I actually can spend a few minutes troubleshooting if/when it doesn’t come back 100%.

1 Like

Petro - how does one turn off HA? I went to configuration->general->server Management and hit “stop” but bringing up the entity under dev-states doesn’t show the setup symbol (cog wheel) like it says here. So how do you change entity names?

This thread is old. what are you trying to do? If you are just trying to change the name, rename it via the cog. If the entity is already registered, you need to remove the other entity.

image

1 Like

Thanks for the fast reply! @petro.
I completely missed the “Entity Registry” in Configuration page and ended up shutting down HA and going in with putty and editing the core-entity_registry file. I deleted all the old media players and renamed the new ones to the old.
I wished I’d have seen that earlier. Thanks again.
Bart

1 Like