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 changed files with 8 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
"""Support the ISY-994 controllers."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from aiohttp import CookieJar
|
||||
|
@ -171,8 +172,14 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
try:
|
||||
with async_timeout.timeout(30):
|
||||
async with async_timeout.timeout(30):
|
||||
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:
|
||||
_LOGGER.error(
|
||||
"Invalid credentials for the ISY, please adjust settings and try again: %s",
|
||||
|
|
Loading…
Add table
Reference in a new issue