mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix async_unload_entry for devolo Home Control (#41488)
This commit is contained in:
parent
cc4d71f942
commit
22f76a9363
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user