diff --git a/tests/components/openai_conversation/test_init.py b/tests/components/openai_conversation/test_init.py index 1b9f81f60c0..1b145d9d545 100644 --- a/tests/components/openai_conversation/test_init.py +++ b/tests/components/openai_conversation/test_init.py @@ -22,11 +22,13 @@ async def test_default_prompt( snapshot: SnapshotAssertion, ) -> None: """Test that the default prompt works.""" + entry = MockConfigEntry(title=None) + entry.add_to_hass(hass) for i in range(3): area_registry.async_create(f"{i}Empty Area") device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", "1234")}, name="Test Device", manufacturer="Test Manufacturer", @@ -35,7 +37,7 @@ async def test_default_prompt( ) for i in range(3): device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", f"{i}abcd")}, name="Test Service", manufacturer="Test Manufacturer", @@ -44,7 +46,7 @@ async def test_default_prompt( entry_type=dr.DeviceEntryType.SERVICE, ) device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", "5678")}, name="Test Device 2", manufacturer="Test Manufacturer 2", @@ -52,7 +54,7 @@ async def test_default_prompt( suggested_area="Test Area 2", ) device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", "9876")}, name="Test Device 3", manufacturer="Test Manufacturer 3", @@ -60,13 +62,13 @@ async def test_default_prompt( suggested_area="Test Area 2", ) device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", "qwer")}, name="Test Device 4", suggested_area="Test Area 2", ) device = device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", "9876-disabled")}, name="Test Device 3", manufacturer="Test Manufacturer 3", @@ -77,14 +79,14 @@ async def test_default_prompt( device.id, disabled_by=dr.DeviceEntryDisabler.USER ) device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", "9876-no-name")}, manufacturer="Test Manufacturer NoName", model="Test Model NoName", suggested_area="Test Area 2", ) device_registry.async_get_or_create( - config_entry_id="1234", + config_entry_id=entry.entry_id, connections={("test", "9876-integer-values")}, name=1, manufacturer=2,