diff --git a/tests/components/openai_conversation/test_init.py b/tests/components/openai_conversation/test_init.py index 0da3842884b4..acfb57abae0f 100644 --- a/tests/components/openai_conversation/test_init.py +++ b/tests/components/openai_conversation/test_init.py @@ -1408,8 +1408,8 @@ async def test_devices( ) assert len(devices) == 4 # One for conversation, AI task, STT, and TTS - # Use the first device for snapshot comparison - device = devices[0] + # Find the conversation device for snapshot comparison + device = next(d for d in devices if d.name == "OpenAI Conversation") assert device == snapshot(exclude=props("identifiers")) # Verify the device has identifiers matching one of the subentries expected_identifiers = [