From ac0b0b652ead8f911a077c4f3620f7853d90fb3c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 24 Jun 2025 17:55:58 +0200 Subject: [PATCH] cleanup --- tests/integration/test_duplicate_entities.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_duplicate_entities.py b/tests/integration/test_duplicate_entities.py index ba40e6bd23..9b30d2db5a 100644 --- a/tests/integration/test_duplicate_entities.py +++ b/tests/integration/test_duplicate_entities.py @@ -37,8 +37,7 @@ async def test_duplicate_entities( entities = await client.list_entities_services() all_entities: list[EntityInfo] = [] for entity_list in entities[0]: - if hasattr(entity_list, "object_id"): - all_entities.append(entity_list) + all_entities.append(entity_list) # Group entities by type for easier testing sensors = [e for e in all_entities if e.__class__.__name__ == "SensorInfo"] @@ -242,7 +241,7 @@ async def test_duplicate_entities( # Verify we can get states for all entities (ensures they're functional) loop = asyncio.get_running_loop() - states_future: asyncio.Future[bool] = loop.create_future() + states_future: asyncio.Future[None] = loop.create_future() state_count = 0 expected_count = ( len(sensors) + len(binary_sensors) + len(text_sensors) + len(switches) @@ -252,7 +251,7 @@ async def test_duplicate_entities( nonlocal state_count state_count += 1 if state_count >= expected_count and not states_future.done(): - states_future.set_result(True) + states_future.set_result(None) client.subscribe_states(on_state)