Attempt to remove spurious KeyError for the impatient

This commit is contained in:
Thomas Lovén 2021-05-10 09:42:17 +00:00
parent f4ca95d436
commit 9e821b9564

View File

@ -40,7 +40,7 @@ async def setup_connection(hass, config):
def handle_update(hass, connection, msg): def handle_update(hass, connection, msg):
devices = get_devices(hass) devices = get_devices(hass)
deviceID = msg["deviceID"] deviceID = msg["deviceID"]
if deviceID in devices: if deviceID in devices and is_setup_complete(hass):
devices[deviceID].update(msg.get("data", None)) devices[deviceID].update(msg.get("data", None))
async_register_command(hass, handle_connect) async_register_command(hass, handle_connect)