mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Retry isy994 setup later if isy.initialize times out (#51453)
Maybe fixes https://forum.universal-devices.com/topic/26633-home-assistant-isy-component/?do=findComment&comment=312147
This commit is contained in:
parent
e5c70c8789
commit
5fc1822b43
@ -1,6 +1,7 @@
|
|||||||
"""Support the ISY-994 controllers."""
|
"""Support the ISY-994 controllers."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import asyncio
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from aiohttp import CookieJar
|
from aiohttp import CookieJar
|
||||||
@ -171,8 +172,14 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with async_timeout.timeout(30):
|
async with async_timeout.timeout(30):
|
||||||
await isy.initialize()
|
await isy.initialize()
|
||||||
|
except asyncio.TimeoutError as err:
|
||||||
|
_LOGGER.error(
|
||||||
|
"Timed out initializing the ISY; device may be busy, trying again later: %s",
|
||||||
|
err,
|
||||||
|
)
|
||||||
|
raise ConfigEntryNotReady from err
|
||||||
except ISYInvalidAuthError as err:
|
except ISYInvalidAuthError as err:
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
"Invalid credentials for the ISY, please adjust settings and try again: %s",
|
"Invalid credentials for the ISY, please adjust settings and try again: %s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user