Handle occassional 502 Bad Gateway from SimpliSafe (#22131)
This commit is contained in:
parent
ba923d2d66
commit
0d42ed1861
1 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue