Fix unloading KNX integration without sensors (#97720)
This commit is contained in:
parent
bfa394d399
commit
fd26739bbf
1 changed files with 7 additions and 4 deletions
|
@ -342,10 +342,13 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
unload_ok = await hass.config_entries.async_unload_platforms(
|
||||
entry,
|
||||
[
|
||||
platform
|
||||
for platform in SUPPORTED_PLATFORMS
|
||||
if platform in hass.data[DATA_KNX_CONFIG]
|
||||
and platform is not Platform.NOTIFY
|
||||
Platform.SENSOR, # always unload system entities (telegram counter, etc.)
|
||||
*[
|
||||
platform
|
||||
for platform in SUPPORTED_PLATFORMS
|
||||
if platform in hass.data[DATA_KNX_CONFIG]
|
||||
and platform not in (Platform.SENSOR, Platform.NOTIFY)
|
||||
],
|
||||
],
|
||||
)
|
||||
if unload_ok:
|
||||
|
|
Loading…
Add table
Reference in a new issue