Handle Sense timeout exceptions from initial authentication (#72369)

This commit is contained in:
Keilin Bickar 2022-05-23 11:45:01 -04:00 committed by GitHub
parent 1b5a46a5ba
commit c10d456d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
except (SenseAuthenticationException, SenseMFARequiredException) as err:
_LOGGER.warning("Sense authentication expired")
raise ConfigEntryAuthFailed(err) from err
except SENSE_TIMEOUT_EXCEPTIONS as err:
raise ConfigEntryNotReady(
str(err) or "Timed out during authentication"
) from err
sense_devices_data = SenseDevicesData()
try: