{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16524","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16524/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16524/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16524/events","html_url":"https://github.com/home-assistant/home-assistant/issues/16524","id":358406263,"node_id":"MDU6SXNzdWUzNTg0MDYyNjM=","number":16524,"title":"Cannot unregister entity (save failed: Entity is already registered)","user":{"login":"watermark","id":1056975,"node_id":"MDQ6VXNlcjEwNTY5NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1056975?v=4","gravatar_id":"","url":"https://api.github.com/users/watermark","html_url":"https://github.com/watermark","followers_url":"https://api.github.com/users/watermark/followers","following_url":"https://api.github.com/users/watermark/following{/other_user}","gists_url":"https://api.github.com/users/watermark/gists{/gist_id}","starred_url":"https://api.github.com/users/watermark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watermark/subscriptions","organizations_url":"https://api.github.com/users/watermark/orgs","repos_url":"https://api.github.com/users/watermark/repos","events_url":"https://api.github.com/users/watermark/events{/privacy}","received_events_url":"https://api.github.com/users/watermark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-09T19:51:59Z","updated_at":"2018-09-21T20:08:06Z","closed_at":null,"author_association":"NONE","body":"**Home Assistant release with the issue:**\r\n0.77.3\r\n\r\n**Operating environment (Hass.io/Docker/Windows/etc.):**\r\nOfficial Docker image\r\n\r\n**Description of problem:**\r\nTrying to rename an entity from \"media_player.googlehome1234\" to \"media_player.basement_speaker\" produces the error \"save failed: entity is already registered\".  There did use to be an entity named \"media_player.basement_speaker\", but it no longer exists on the network.  As far as I can tell, the GUI offers no way of removing that old unused entry.\r\n\r\nI've confirmed that there is an entry in the .storage/core.entity_registry for the \"media_player.basement_speaker\"; however, according to the 0.77 changelog, we're not suppose to edit the .storage/core.entity_registry file directly.  That makes this issue a bug in my mind.  There is no supported way to remove old entries.\r\n\r\nIn the meantime, despite the warnings, is it safe to shutdown the ha service, remove the entry from the core.entity_registry, and bring it back up?\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/423656486","html_url":"https://github.com/home-assistant/home-assistant/issues/16524#issuecomment-423656486","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16524","id":423656486,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzY1NjQ4Ng==","user":{"login":"ArnoutVerbeken","id":14241524,"node_id":"MDQ6VXNlcjE0MjQxNTI0","avatar_url":"https://avatars2.githubusercontent.com/u/14241524?v=4","gravatar_id":"","url":"https://api.github.com/users/ArnoutVerbeken","html_url":"https://github.com/ArnoutVerbeken","followers_url":"https://api.github.com/users/ArnoutVerbeken/followers","following_url":"https://api.github.com/users/ArnoutVerbeken/following{/other_user}","gists_url":"https://api.github.com/users/ArnoutVerbeken/gists{/gist_id}","starred_url":"https://api.github.com/users/ArnoutVerbeken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArnoutVerbeken/subscriptions","organizations_url":"https://api.github.com/users/ArnoutVerbeken/orgs","repos_url":"https://api.github.com/users/ArnoutVerbeken/repos","events_url":"https://api.github.com/users/ArnoutVerbeken/events{/privacy}","received_events_url":"https://api.github.com/users/ArnoutVerbeken/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T20:08:06Z","updated_at":"2018-09-21T20:08:06Z","author_association":"NONE","body":"Same here, had to factory reset my Google Home as part of debugging the cast issue (before reading about that issue here), now my Google Home shows up as a new entity and I can't rename it to my old name media_player.google_home_living_room.\r\nInstead it shows up as media_player.google_home_living_room_2.\r\n\r\nThis of course breaks all automations refering to media_player.google_home_living_room.\r\n\r\nI think it should be possible to clean the old entries from the registry."}}
{"actor":{"display_login":"ArnoutVerbeken"}}