mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Fix unloading KNX integration without sensors (#97720)
This commit is contained in:
parent
bfa394d399
commit
fd26739bbf
@ -342,10 +342,13 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
unload_ok = await hass.config_entries.async_unload_platforms(
|
unload_ok = await hass.config_entries.async_unload_platforms(
|
||||||
entry,
|
entry,
|
||||||
[
|
[
|
||||||
platform
|
Platform.SENSOR, # always unload system entities (telegram counter, etc.)
|
||||||
for platform in SUPPORTED_PLATFORMS
|
*[
|
||||||
if platform in hass.data[DATA_KNX_CONFIG]
|
platform
|
||||||
and platform is not Platform.NOTIFY
|
for platform in SUPPORTED_PLATFORMS
|
||||||
|
if platform in hass.data[DATA_KNX_CONFIG]
|
||||||
|
and platform not in (Platform.SENSOR, Platform.NOTIFY)
|
||||||
|
],
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
if unload_ok:
|
if unload_ok:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user