Retry on SenseAPIException during sense config entry setup (#73651)

This commit is contained in:
J. Nick Koston 2022-06-17 14:03:42 -05:00 committed by Franck Nijhof
parent 9e4ee0d36d
commit eda2c8cb8f
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -5,6 +5,7 @@ import logging
from sense_energy import (
ASyncSenseable,
SenseAPIException,
SenseAuthenticationException,
SenseMFARequiredException,
)
@ -84,6 +85,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
raise ConfigEntryNotReady(
str(err) or "Timed out during authentication"
) from err
except SenseAPIException as err:
raise ConfigEntryNotReady(str(err)) from err
sense_devices_data = SenseDevicesData()
try: