From b5c4dc13e010f2f7d9b37dec91aed88f254b8217 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 16 Oct 2025 06:07:41 -1000 Subject: [PATCH] fix flakey --- tests/integration/state_utils.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/integration/state_utils.py b/tests/integration/state_utils.py index 7392393501..5f34bb61d4 100644 --- a/tests/integration/state_utils.py +++ b/tests/integration/state_utils.py @@ -60,17 +60,16 @@ class InitialStateHelper: not_waiting = { (e.device_id, e.key) for e in entities } - self._wait_initial_states - _LOGGER.debug( - "InitialStateHelper: NOT waiting for %d entities: %s", - len(not_waiting), - [ - ( - type(self._entities_by_id[k]).__name__, - self._entities_by_id[k].object_id, - ) + if not_waiting: + not_waiting_info = [ + f"{type(self._entities_by_id[k]).__name__}:{self._entities_by_id[k].object_id}" for k in not_waiting - ], - ) + ] + _LOGGER.debug( + "InitialStateHelper: NOT waiting for %d entities: %s", + len(not_waiting), + not_waiting_info, + ) # Create future in the running event loop self._initial_states_received = asyncio.get_running_loop().create_future()