Fix Soma integration reload (#44750)
* fix async_unload_entry so that component reload works from GUI * update to use asyncio based on review feedbackpull/44791/head
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…
Reference in New Issue