From 2553b0d1e028ab6a4deee664613a1ac0926293a5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 13 Apr 2020 18:16:17 -0500 Subject: [PATCH] =?UTF-8?q?Increase=20timeout=20and=20log=20the=20url=20of?= =?UTF-8?q?=20the=20elkm1=20system=20that=20time=E2=80=A6=20(#34172)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Log the url of the elkm1 system that times out * Bump timeout to 120s --- homeassistant/components/elkm1/__init__.py | 6 ++++-- homeassistant/components/elkm1/config_flow.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/elkm1/__init__.py b/homeassistant/components/elkm1/__init__.py index 183897d306e..5c6fbf71738 100644 --- a/homeassistant/components/elkm1/__init__.py +++ b/homeassistant/components/elkm1/__init__.py @@ -39,7 +39,7 @@ from .const import ( ELK_ELEMENTS, ) -SYNC_TIMEOUT = 55 +SYNC_TIMEOUT = 120 _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): _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() raise ConfigEntryNotReady diff --git a/homeassistant/components/elkm1/config_flow.py b/homeassistant/components/elkm1/config_flow.py index cad3ecac42a..c96e6e549c0 100644 --- a/homeassistant/components/elkm1/config_flow.py +++ b/homeassistant/components/elkm1/config_flow.py @@ -64,8 +64,9 @@ async def validate_input(data): timed_out = False if not await async_wait_for_elk_to_sync(elk, VALIDATE_TIMEOUT): _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, + url, ) timed_out = True