Allow renaming entities in entity registry (#12636)

* Allow renaming entities in entity registry

* Lint
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-02-24 10:53:59 -08:00
1 parent 2821820281
commit 6d431c3fc3
9 files changed
+333 -47

No files matched your search

+6
View File
@@ -340,6 +340,12 @@ class Entity(object):
else:
self.hass.states.async_remove(self.entity_id)
@callback
def async_registry_updated(self, old, new):
"""Called when the entity registry has been updated."""
self.registry_name = new.name
self.async_schedule_update_ha_state()
def __eq__(self, other):
"""Return the comparison."""
if not isinstance(other, self.__class__):