Allow changing entity ID (#15637)
* Allow changing entity ID * Add support to websocket command * Address comments * Error handling
This commit is contained in:
parent
fbeaa57604
commit
d9cf8fcfe8
7 changed files with 206 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue