diff --git a/homeassistant/components/devolo_home_control/__init__.py b/homeassistant/components/devolo_home_control/__init__.py index c955bf77096..69327f96510 100644 --- a/homeassistant/components/devolo_home_control/__init__.py +++ b/homeassistant/components/devolo_home_control/__init__.py @@ -1,4 +1,5 @@ """The devolo_home_control integration.""" +import asyncio from functools import partial from devolo_home_control_api.homecontrol import HomeControl @@ -71,8 +72,13 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool async def async_unload_entry(hass, config_entry): """Unload a config entry.""" - unload = await hass.config_entries.async_forward_entry_unload( - config_entry, "switch" + unload = all( + await asyncio.gather( + *[ + hass.config_entries.async_forward_entry_unload(config_entry, platform) + for platform in PLATFORMS + ] + ) ) await hass.async_add_executor_job(