Fix lingering timer in ZHA debouncers (#91685)

This commit is contained in:
epenet 2023-04-19 18:45:27 +02:00 committed by GitHub
parent ec914815bd
commit d70ae8afc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -320,6 +320,7 @@ class ZhaGroupEntity(BaseZhaEntity):
immediate=False,
function=functools.partial(self.async_update_ha_state, True),
)
self.async_on_remove(self._change_listener_debouncer.async_cancel)
self._async_unsub_state_changed = async_track_state_change_event(
self.hass, self._entity_ids, self.async_state_changed_listener
)

View file

@ -1178,6 +1178,7 @@ class LightGroup(BaseLight, ZhaGroupEntity):
function=self._force_member_updates,
)
self._debounced_member_refresh = force_refresh_debouncer
self.async_on_remove(force_refresh_debouncer.async_cancel)
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the entity on."""