mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix async_unload_entry for devolo Home Control (#41488)
This commit is contained in:
parent
29a613e91f
commit
a81f4cf387
@ -1,4 +1,5 @@
|
|||||||
"""The devolo_home_control integration."""
|
"""The devolo_home_control integration."""
|
||||||
|
import asyncio
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from devolo_home_control_api.homecontrol import HomeControl
|
from devolo_home_control_api.homecontrol import HomeControl
|
||||||
@ -73,8 +74,13 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
|
|||||||
|
|
||||||
async def async_unload_entry(hass, config_entry):
|
async def async_unload_entry(hass, config_entry):
|
||||||
"""Unload a config entry."""
|
"""Unload a config entry."""
|
||||||
unload = await hass.config_entries.async_forward_entry_unload(
|
unload = all(
|
||||||
config_entry, "switch"
|
await asyncio.gather(
|
||||||
|
*[
|
||||||
|
hass.config_entries.async_forward_entry_unload(config_entry, platform)
|
||||||
|
for platform in PLATFORMS
|
||||||
|
]
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
await hass.async_add_executor_job(
|
await hass.async_add_executor_job(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user