mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Increase isy setup timeout to 60s (#51559)
- Ensure errors are displayed in the UI
This commit is contained in:
parent
85ce679c64
commit
75dffee312
@ -172,14 +172,12 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with async_timeout.timeout(30):
|
async with async_timeout.timeout(60):
|
||||||
await isy.initialize()
|
await isy.initialize()
|
||||||
except asyncio.TimeoutError as err:
|
except asyncio.TimeoutError as err:
|
||||||
_LOGGER.error(
|
raise ConfigEntryNotReady(
|
||||||
"Timed out initializing the ISY; device may be busy, trying again later: %s",
|
f"Timed out initializing the ISY; device may be busy, trying again later: {err}"
|
||||||
err,
|
) from 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",
|
||||||
@ -187,16 +185,13 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
except ISYConnectionError as err:
|
except ISYConnectionError as err:
|
||||||
_LOGGER.error(
|
raise ConfigEntryNotReady(
|
||||||
"Failed to connect to the ISY, please adjust settings and try again: %s",
|
f"Failed to connect to the ISY, please adjust settings and try again: {err}"
|
||||||
err,
|
) from err
|
||||||
)
|
|
||||||
raise ConfigEntryNotReady from err
|
|
||||||
except ISYResponseParseError as err:
|
except ISYResponseParseError as err:
|
||||||
_LOGGER.warning(
|
raise ConfigEntryNotReady(
|
||||||
"Error processing responses from the ISY; device may be busy, trying again later"
|
f"Invalid XML response from ISY; Ensure the ISY is running the latest firmware: {err}"
|
||||||
)
|
) from err
|
||||||
raise ConfigEntryNotReady from err
|
|
||||||
|
|
||||||
_categorize_nodes(hass_isy_data, isy.nodes, ignore_identifier, sensor_identifier)
|
_categorize_nodes(hass_isy_data, isy.nodes, ignore_identifier, sensor_identifier)
|
||||||
_categorize_programs(hass_isy_data, isy.programs)
|
_categorize_programs(hass_isy_data, isy.programs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user