From 9831498259f55d0cc52692fa118c1280064797eb Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 10 Aug 2023 18:23:44 +0200 Subject: [PATCH] Adjust mazda tests which create devices (#98199) --- tests/components/mazda/test_init.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/components/mazda/test_init.py b/tests/components/mazda/test_init.py index 86436ac4184..3556f687989 100644 --- a/tests/components/mazda/test_init.py +++ b/tests/components/mazda/test_init.py @@ -259,8 +259,10 @@ async def test_service_device_id_not_mazda_vehicle(hass: HomeAssistant) -> None: device_registry = dr.async_get(hass) # Create another device and pass its device ID. # Service should fail because device is from wrong domain. + other_config_entry = MockConfigEntry() + other_config_entry.add_to_hass(hass) other_device = device_registry.async_get_or_create( - config_entry_id="test_config_entry_id", + config_entry_id=other_config_entry.entry_id, identifiers={("OTHER_INTEGRATION", "ID_FROM_OTHER_INTEGRATION")}, )