Skip to content

Commit

Permalink
feat: add process_timestamp attribute to notification sensors (#966)
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Tse <[email protected]>
  • Loading branch information
kkellner authored Oct 2, 2020
1 parent 196e41e commit c4a6df5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions custom_components/alexa_media/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,13 @@ def device_state_attributes(self):

attr = {
"recurrence": self.recurrence,
"process_timestamp":

dt.as_local(
datetime.datetime.fromtimestamp(
self._timestamp.timestamp()
)
).isoformat(),
"prior_value": self._process_state(self._prior_value),
"total_active": len(self._active),
"total_all": len(self._all),
Expand Down

0 comments on commit c4a6df5

Please sign in to comment.