Reconnect on any ScreenLogic exception (#89269)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Kevin Worrel
2023-03-11 09:27:33 -10:00
committed by GitHub
co-authored by J. Nick Koston
parent 8564768d9e
commit 56454c8580
@@ -159,11 +159,9 @@ class ScreenlogicDataUpdateCoordinator(DataUpdateCoordinator):
"""Fetch data from the Screenlogic gateway."""
try:
await self._async_update_configured_data()
except ScreenLogicError as error:
_LOGGER.warning("Update error - attempting reconnect: %s", error)
except (ScreenLogicError, ScreenLogicWarning) as ex:
_LOGGER.warning("Update error - attempting reconnect: %s", ex)
await self._async_reconnect_update_data()
except ScreenLogicWarning as warn:
raise UpdateFailed(f"Incomplete update: {warn}") from warn
return None