From 9e821b9564a8603e0d2da915f59680425894a158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Mon, 10 May 2021 09:42:17 +0000 Subject: [PATCH] Attempt to remove spurious KeyError for the impatient --- custom_components/browser_mod/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/browser_mod/connection.py b/custom_components/browser_mod/connection.py index d96ec97..c6a1b73 100644 --- a/custom_components/browser_mod/connection.py +++ b/custom_components/browser_mod/connection.py @@ -40,7 +40,7 @@ async def setup_connection(hass, config): def handle_update(hass, connection, msg): devices = get_devices(hass) deviceID = msg["deviceID"] - if deviceID in devices: + if deviceID in devices and is_setup_complete(hass): devices[deviceID].update(msg.get("data", None)) async_register_command(hass, handle_connect)