From 6dd5fdb736d5203d3a2f4ef2c9a34bdc5b22cfec Mon Sep 17 00:00:00 2001 From: David Mulcahey Date: Sun, 18 Aug 2024 10:59:50 -0400 Subject: [PATCH] Fix icon always being None --- zha/application/platforms/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zha/application/platforms/__init__.py b/zha/application/platforms/__init__.py index 7bbe0f4b..93b26b93 100644 --- a/zha/application/platforms/__init__.py +++ b/zha/application/platforms/__init__.py @@ -117,6 +117,7 @@ class BaseEntity(LogMixin, EventBase): _attr_device_class: str | None _attr_state_class: str | None _attr_enabled: bool = True + _attr_icon: str | None = None def __init__(self, unique_id: str) -> None: """Initialize the platform entity.""" @@ -148,7 +149,7 @@ def fallback_name(self) -> str | None: @property def icon(self) -> str | None: """Return the entity icon.""" - return None + return self._attr_icon @property def translation_key(self) -> str | None: