Handle occassional 502 Bad Gateway from SimpliSafe (#22131)
parent
ba923d2d66
commit
0d42ed1861
|
@ -109,7 +109,13 @@ async def async_setup_entry(hass, config_entry):
|
|||
"""Refresh data from the SimpliSafe account."""
|
||||
for system in systems:
|
||||
_LOGGER.debug('Updating system data: %s', system.system_id)
|
||||
await system.update()
|
||||
|
||||
try:
|
||||
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))
|
||||
|
||||
if system.api.refresh_token_dirty:
|
||||
|
|
Loading…
Reference in New Issue