Skip to content

Commit

Permalink
Add ATTR_ICON
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeveen authored Nov 12, 2022
1 parent 81da6cc commit 5bc5afa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions custom_components/o365/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ATTR_CHAT_ID,
ATTR_CONTENT,
ATTR_FROM_DISPLAY_NAME,
ATTR_ICON,
ATTR_IMPORTANCE,
ATTR_SUBJECT,
ATTR_SUMMARY,
Expand Down Expand Up @@ -266,6 +267,14 @@ def state(self):
"""Sensor state."""
return self._state

@property
def extra_state_attributes(self):
"""Return entity specific state attributes."""
attributes = {
ATTR_ICON: "mdi:microsoft-teams",
}
return attributes

async def async_update(self):
"""Update state."""
data = await self.hass.async_add_executor_job(self._teams.get_my_presence)
Expand Down

0 comments on commit 5bc5afa

Please sign in to comment.