Skip to content

Commit

Permalink
Merge pull request #2363 from alandtse/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse authored Jul 28, 2024
2 parents 80b5451 + 4ecb957 commit cc7ac41
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions custom_components/alexa_media/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def _process_raw_notifications(self):
dt.as_utc(self._attr_native_value),
)

@callback
def _trigger_event(self, time_date) -> None:
_LOGGER.debug(
"%s:Firing %s at %s",
Expand Down Expand Up @@ -704,6 +705,18 @@ def icon(self):
)
return self._attr_icon if not self.paused else off_icon

@property
def timer(self):
"""Return the timer of the sensor."""
return self._next.get("timerLabel") if self._next else None

@property
def extra_state_attributes(self):
"""Return the scene state attributes."""
attr = super().extra_state_attributes
attr.update({"timer": self.timer})
return attr


class ReminderSensor(AlexaMediaNotificationSensor):
"""Representation of a Alexa Reminder sensor."""
Expand Down

0 comments on commit cc7ac41

Please sign in to comment.