diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 1e946421bcf..3391312bdd0 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -522,24 +522,13 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: mqtt_client = mqtt_data.client # Unload publish and dump services. - hass.services.async_remove( - DOMAIN, - SERVICE_PUBLISH, - ) - hass.services.async_remove( - DOMAIN, - SERVICE_DUMP, - ) + hass.services.async_remove(DOMAIN, SERVICE_PUBLISH) + hass.services.async_remove(DOMAIN, SERVICE_DUMP) # Stop the discovery await discovery.async_stop(hass) # Unload the platforms - await asyncio.gather( - *( - hass.config_entries.async_forward_entry_unload(entry, component) - for component in mqtt_data.platforms_loaded - ) - ) + await hass.config_entries.async_unload_platforms(entry, mqtt_data.platforms_loaded) mqtt_data.platforms_loaded = set() await asyncio.sleep(0) # Unsubscribe reload dispatchers