Entity Registry to store and restore name/icon (#31714)

* Entity Registry to store and restore name/icon

* Update test_entity_registry.py

* Add original name/icon to JSON result
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-02-11 09:40:50 -08:00
1 parent ecd7ec385d
commit 51c35ab9a8
6 files changed
+84 -7

No files matched your search

+1 -1
View File
@@ -337,7 +337,7 @@ class Entity(ABC):
if name is not None:
attr[ATTR_FRIENDLY_NAME] = name
icon = self.icon
icon = (entry and entry.icon) or self.icon
if icon is not None:
attr[ATTR_ICON] = icon