Migrate zha to use Debouncer.async_schedule_call (#111103)
parent
3ecbd05ac0
commit
59066c1770
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue