mirror of
https://github.com/home-assistant/core.git
synced 2026-09-30 04:03:49 +01:00
Disconnect wiffi entity signals on unload (#183280)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user