mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Handle occassional 502 Bad Gateway from SimpliSafe (#22131)
This commit is contained in:
parent
ba923d2d66
commit
0d42ed1861
@ -109,7 +109,13 @@ async def async_setup_entry(hass, config_entry):
|
|||||||
"""Refresh data from the SimpliSafe account."""
|
"""Refresh data from the SimpliSafe account."""
|
||||||
for system in systems:
|
for system in systems:
|
||||||
_LOGGER.debug('Updating system data: %s', system.system_id)
|
_LOGGER.debug('Updating system data: %s', system.system_id)
|
||||||
|
|
||||||
|
try:
|
||||||
await system.update()
|
await system.update()
|
||||||
|
except SimplipyError as err:
|
||||||
|
_LOGGER.error('There was an error while updating: %s', err)
|
||||||
|
return
|
||||||
|
|
||||||
async_dispatcher_send(hass, TOPIC_UPDATE.format(system.system_id))
|
async_dispatcher_send(hass, TOPIC_UPDATE.format(system.system_id))
|
||||||
|
|
||||||
if system.api.refresh_token_dirty:
|
if system.api.refresh_token_dirty:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user