mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Retry on SenseAPIException during sense config entry setup (#73651)
This commit is contained in:
parent
4bc5d7bfed
commit
600d23e052
@ -5,6 +5,7 @@ import logging
|
|||||||
|
|
||||||
from sense_energy import (
|
from sense_energy import (
|
||||||
ASyncSenseable,
|
ASyncSenseable,
|
||||||
|
SenseAPIException,
|
||||||
SenseAuthenticationException,
|
SenseAuthenticationException,
|
||||||
SenseMFARequiredException,
|
SenseMFARequiredException,
|
||||||
)
|
)
|
||||||
@ -84,6 +85,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
raise ConfigEntryNotReady(
|
raise ConfigEntryNotReady(
|
||||||
str(err) or "Timed out during authentication"
|
str(err) or "Timed out during authentication"
|
||||||
) from err
|
) from err
|
||||||
|
except SenseAPIException as err:
|
||||||
|
raise ConfigEntryNotReady(str(err)) from err
|
||||||
|
|
||||||
sense_devices_data = SenseDevicesData()
|
sense_devices_data = SenseDevicesData()
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user