Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change icon of Team Status Sensor to real Teams Icon #80

Merged
merged 6 commits into from
Nov 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions custom_components/o365/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ def state(self):
"""State property."""
return self._state

@property
def icon(self):
"""Entity icon."""
return "mdi:microsoft-outlook"

@property
def extra_state_attributes(self):
"""Device state attributes."""
Expand Down Expand Up @@ -266,6 +271,11 @@ def state(self):
"""Sensor state."""
return self._state

@property
def icon(self):
"""Entity icon."""
return "mdi:microsoft-teams"

async def async_update(self):
"""Update state."""
data = await self.hass.async_add_executor_job(self._teams.get_my_presence)
Expand Down Expand Up @@ -297,6 +307,11 @@ def state(self):
"""Sensor state."""
return self._state

@property
def icon(self):
"""Entity icon."""
return "mdi:microsoft-teams"

@property
def extra_state_attributes(self):
"""Return entity specific state attributes."""
Expand Down