mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix Soma integration reload (#44750)
* fix async_unload_entry so that component reload works from GUI * update to use asyncio based on review feedback
This commit is contained in:
parent
3de0610909
commit
cc21639f00
@ -1,4 +1,5 @@
|
||||
"""Support for Soma Smartshades."""
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
from api.soma_api import SomaApi
|
||||
@ -63,7 +64,16 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
||||
|
||||
async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
||||
"""Unload a config entry."""
|
||||
return True
|
||||
unload_ok = all(
|
||||
await asyncio.gather(
|
||||
*[
|
||||
hass.config_entries.async_forward_entry_unload(entry, component)
|
||||
for component in SOMA_COMPONENTS
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
return unload_ok
|
||||
|
||||
|
||||
class SomaEntity(Entity):
|
||||
|
Loading…
x
Reference in New Issue
Block a user