Listen for an event just once at Home Connect test (#144031)

This commit is contained in:
J. Diego Rodríguez Royo 2025-05-01 11:24:29 +02:00 committed by GitHub
parent a084b9fdde
commit c0f0a4a1ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()