mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Increase timeout and log the url of the elkm1 system that time… (#34172)
* Log the url of the elkm1 system that times out * Bump timeout to 120s
This commit is contained in:
parent
29f50ddc9c
commit
983b1e1e9d
@ -39,7 +39,7 @@ from .const import (
|
|||||||
ELK_ELEMENTS,
|
ELK_ELEMENTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
SYNC_TIMEOUT = 55
|
SYNC_TIMEOUT = 120
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -215,7 +215,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
|||||||
|
|
||||||
if not await async_wait_for_elk_to_sync(elk, SYNC_TIMEOUT):
|
if not await async_wait_for_elk_to_sync(elk, SYNC_TIMEOUT):
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
"Timed out after %d seconds while trying to sync with ElkM1", SYNC_TIMEOUT,
|
"Timed out after %d seconds while trying to sync with ElkM1 at %s",
|
||||||
|
SYNC_TIMEOUT,
|
||||||
|
conf[CONF_HOST],
|
||||||
)
|
)
|
||||||
elk.disconnect()
|
elk.disconnect()
|
||||||
raise ConfigEntryNotReady
|
raise ConfigEntryNotReady
|
||||||
|
@ -64,8 +64,9 @@ async def validate_input(data):
|
|||||||
timed_out = False
|
timed_out = False
|
||||||
if not await async_wait_for_elk_to_sync(elk, VALIDATE_TIMEOUT):
|
if not await async_wait_for_elk_to_sync(elk, VALIDATE_TIMEOUT):
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
"Timed out after %d seconds while trying to sync with elkm1",
|
"Timed out after %d seconds while trying to sync with ElkM1 at %s",
|
||||||
VALIDATE_TIMEOUT,
|
VALIDATE_TIMEOUT,
|
||||||
|
url,
|
||||||
)
|
)
|
||||||
timed_out = True
|
timed_out = True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user