From 46cb9cff4182387086c3507549c0adc59b248a99 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 21 Jun 2020 00:39:08 +0200 Subject: [PATCH] Fix ESPHome discovery for ignored config entries (#36964) --- homeassistant/components/esphome/config_flow.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/esphome/config_flow.py b/homeassistant/components/esphome/config_flow.py index 2ae380c9a7c..5c35909088d 100644 --- a/homeassistant/components/esphome/config_flow.py +++ b/homeassistant/components/esphome/config_flow.py @@ -100,10 +100,10 @@ class EsphomeFlowHandler(ConfigFlow, domain=DOMAIN): for entry in self._async_current_entries(): already_configured = False - if ( - entry.data[CONF_HOST] == address - or entry.data[CONF_HOST] == discovery_info[CONF_HOST] - ): + if CONF_HOST in entry.data and entry.data[CONF_HOST] in [ + address, + discovery_info[CONF_HOST], + ]: # Is this address or IP address already configured? already_configured = True elif entry.entry_id in self.hass.data.get(DATA_KEY, {}):