Skip to content

Commit

Permalink
Fix icon always being None
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey committed Aug 18, 2024
1 parent bcac7d4 commit 9b45bbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zha/application/platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9b45bbe

Please sign in to comment.