Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
Address API glitch causing frequent state changes
  • Loading branch information
finity69x2 authored Dec 16, 2024
1 parent 6234359 commit 3a97e75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/nws_alerts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ async def _async_update_data(self):
async with timeout(self.timeout):
try:
data = await update_alerts(self.config, coords)
except AttributeError:
_LOGGER.debug("Error fetching most recent data from NWS Alerts API; will continue trying")
data = "AttributeError"
except Exception as error:
raise UpdateFailed(error) from error
_LOGGER.debug("Data: %s", data)
Expand Down

0 comments on commit 3a97e75

Please sign in to comment.