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:
1 parent
ecd7ec385d
commit
51c35ab9a8
6 files changed
+84
-7
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user