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

pull/73657/head
J. Nick Koston 2022-06-17 14:03:42 -05:00 committed by GitHub
parent 4bc5d7bfed
commit 600d23e052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

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: