Skip to content

Commit

Permalink
fix: icon property
Browse files Browse the repository at this point in the history
  • Loading branch information
sopelj committed Jan 15, 2022
1 parent 8188daf commit f167b76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/ember_mug/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def available(self) -> bool:
class EmberMugSensor(EmberMugSensorBase, SensorEntity):
"""Base Mug State Sensor."""

@property
def icon(self) -> str | None:
"""Change icon based on state."""
return ICON_EMPTY if self.state == "Empty" else ICON_DEFAULT
Expand Down

0 comments on commit f167b76

Please sign in to comment.