mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Listen for an event just once at Home Connect test (#144031)
This commit is contained in:
parent
a084b9fdde
commit
c0f0a4a1ac
@ -328,7 +328,7 @@ async def test_event_listener(
|
|||||||
def event_filter(_: EventStateReportedData) -> bool:
|
def event_filter(_: EventStateReportedData) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
hass.bus.async_listen(EVENT_STATE_REPORTED, listener_callback, event_filter)
|
hass.bus.async_listen_once(EVENT_STATE_REPORTED, listener_callback, event_filter)
|
||||||
|
|
||||||
entity_registry.async_update_entity(entity_id, new_entity_id=new_entity_id)
|
entity_registry.async_update_entity(entity_id, new_entity_id=new_entity_id)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user