From 190871573951b5e8a709d35035d8b6bc9ecd2da0 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 27 Sep 2026 13:12:37 +0200 Subject: [PATCH] Disconnect wiffi entity signals on unload (#183280) Co-authored-by: Claude --- homeassistant/components/wiffi/binary_sensor.py | 4 +++- homeassistant/components/wiffi/sensor.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/wiffi/binary_sensor.py b/homeassistant/components/wiffi/binary_sensor.py index f72a03b0ee32..d503e3dc9921 100644 --- a/homeassistant/components/wiffi/binary_sensor.py +++ b/homeassistant/components/wiffi/binary_sensor.py @@ -33,7 +33,9 @@ async def async_setup_entry( async_add_entities(entities) - async_dispatcher_connect(hass, CREATE_ENTITY_SIGNAL, _create_entity) + config_entry.async_on_unload( + async_dispatcher_connect(hass, CREATE_ENTITY_SIGNAL, _create_entity) + ) class BoolEntity(WiffiEntity, BinarySensorEntity): diff --git a/homeassistant/components/wiffi/sensor.py b/homeassistant/components/wiffi/sensor.py index f896c1af11e4..1f44c9f3bca6 100644 --- a/homeassistant/components/wiffi/sensor.py +++ b/homeassistant/components/wiffi/sensor.py @@ -63,7 +63,9 @@ async def async_setup_entry( async_add_entities(entities) - async_dispatcher_connect(hass, CREATE_ENTITY_SIGNAL, _create_entity) + config_entry.async_on_unload( + async_dispatcher_connect(hass, CREATE_ENTITY_SIGNAL, _create_entity) + ) class NumberEntity(WiffiEntity, SensorEntity):