Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
add event expiration
  • Loading branch information
finity69x2 authored Jul 10, 2022
1 parent 06657c4 commit 31d8619
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/nws_alerts/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
self._message_type = None
self._event_status = None
self._event_severity = None
self._event_expires = None
self._display_desc = None
self._spoken_desc = None
self._zone_id = entry.data[CONF_ZONE_ID].replace(" ", "")
Expand Down Expand Up @@ -136,6 +137,7 @@ def extra_state_attributes(self):
attrs["message_type"] = self.coordinator.data["message_type"]
attrs["event_status"] = self.coordinator.data["event_status"]
attrs["event_severity"] = self.coordinator.data["event_severity"]
attrs["event_expires"] = self.coordinator.data["event_expires"]
attrs["display_desc"] = self.coordinator.data["display_desc"]
attrs["spoken_desc"] = self.coordinator.data["spoken_desc"]

Expand Down

0 comments on commit 31d8619

Please sign in to comment.