Allow changing entity ID (#15637)

* Allow changing entity ID

* Add support to websocket command

* Address comments

* Error handling
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-07-24 14:12:53 +02:00
1 parent fbeaa57604
commit d9cf8fcfe8
7 files changed
+206 -22

No files matched your search

+1 -1
View File
@@ -283,7 +283,7 @@ class EntityPlatform:
entity.entity_id = entry.entity_id
entity.registry_name = entry.name
entry.add_update_listener(entity)
entity.async_on_remove(entry.add_update_listener(entity))
# We won't generate an entity ID if the platform has already set one
# We will however make sure that platform cannot pick a registered ID