From 760f822dce5091d6af8a2121f2099cbfa36fc5ea Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 1 Oct 2018 09:01:40 +0200 Subject: [PATCH] Fix MQTT discovery (#17004) --- homeassistant/components/mqtt/discovery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/mqtt/discovery.py b/homeassistant/components/mqtt/discovery.py index 6a0b8555ddb..fdb7948e4bf 100644 --- a/homeassistant/components/mqtt/discovery.py +++ b/homeassistant/components/mqtt/discovery.py @@ -120,9 +120,9 @@ async def async_start(hass: HomeAssistantType, discovery_topic, hass_config, config_entries_key = '{}.{}'.format(component, platform) if config_entries_key not in hass.data[CONFIG_ENTRY_IS_SETUP]: + hass.data[CONFIG_ENTRY_IS_SETUP].add(config_entries_key) await hass.config_entries.async_forward_entry_setup( config_entry, component) - hass.data[CONFIG_ENTRY_IS_SETUP].add(config_entries_key) async_dispatcher_send(hass, MQTT_DISCOVERY_NEW.format( component, platform), payload)