mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Migrate zha to use Debouncer.async_schedule_call (#111103)
This commit is contained in:
@@ -324,7 +324,7 @@ class ZhaGroupEntity(BaseZhaEntity):
|
||||
"""Handle child updates."""
|
||||
# Delay to ensure that we get updates from all members before updating the group
|
||||
assert self._change_listener_debouncer
|
||||
self.hass.create_task(self._change_listener_debouncer.async_call())
|
||||
self._change_listener_debouncer.async_schedule_call()
|
||||
|
||||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Handle removal from Home Assistant."""
|
||||
|
@@ -374,6 +374,7 @@ async def test_zha_group_fan_entity(
|
||||
# test some of the group logic to make sure we key off states correctly
|
||||
await send_attributes_report(hass, dev1_fan_cluster, {0: 0})
|
||||
await send_attributes_report(hass, dev2_fan_cluster, {0: 0})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
# test that group fan is off
|
||||
assert hass.states.get(entity_id).state == STATE_OFF
|
||||
|
Reference in New Issue
Block a user