mirror of
https://github.com/home-assistant/core.git
synced 2026-10-07 06:50:41 -04:00
Disconnect zwave_me light signals on unload (#183278)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -33,14 +33,22 @@ async def async_setup_entry(
|
||||
"""Add a new device."""
|
||||
async_add_entities([ZWaveMeRGB(config_entry.runtime_data, new_device)])
|
||||
|
||||
async_dispatcher_connect(
|
||||
hass, f"ZWAVE_ME_NEW_{ZWaveMePlatform.RGB_LIGHT.upper()}", add_new_device
|
||||
config_entry.async_on_unload(
|
||||
async_dispatcher_connect(
|
||||
hass, f"ZWAVE_ME_NEW_{ZWaveMePlatform.RGB_LIGHT.upper()}", add_new_device
|
||||
)
|
||||
)
|
||||
async_dispatcher_connect(
|
||||
hass, f"ZWAVE_ME_NEW_{ZWaveMePlatform.RGBW_LIGHT.upper()}", add_new_device
|
||||
config_entry.async_on_unload(
|
||||
async_dispatcher_connect(
|
||||
hass, f"ZWAVE_ME_NEW_{ZWaveMePlatform.RGBW_LIGHT.upper()}", add_new_device
|
||||
)
|
||||
)
|
||||
async_dispatcher_connect(
|
||||
hass, f"ZWAVE_ME_NEW_{ZWaveMePlatform.BRIGHTNESS_LIGHT.upper()}", add_new_device
|
||||
config_entry.async_on_unload(
|
||||
async_dispatcher_connect(
|
||||
hass,
|
||||
f"ZWAVE_ME_NEW_{ZWaveMePlatform.BRIGHTNESS_LIGHT.upper()}",
|
||||
add_new_device,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user