diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 70f20453633..335b4d31acb 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -321,7 +321,8 @@ async def _async_setup_server(hass: HomeAssistantType, config: ConfigType): async def _async_setup_discovery(hass: HomeAssistantType, conf: ConfigType, - hass_config: ConfigType) -> bool: + hass_config: ConfigType, + config_entry) -> bool: """Try to start the discovery of MQTT devices. This method is a coroutine. @@ -334,7 +335,8 @@ async def _async_setup_discovery(hass: HomeAssistantType, conf: ConfigType, return False success = await discovery.async_start( - hass, conf[CONF_DISCOVERY_PREFIX], hass_config) # type: bool + hass, conf[CONF_DISCOVERY_PREFIX], hass_config, + config_entry) # type: bool return success @@ -525,7 +527,7 @@ async def async_setup_entry(hass, entry): if conf.get(CONF_DISCOVERY): await _async_setup_discovery( - hass, conf, hass.data[DATA_MQTT_HASS_CONFIG]) + hass, conf, hass.data[DATA_MQTT_HASS_CONFIG], entry) return True