From 75119b833cf801cdca5d4079b5e7b54483732f67 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 10 Aug 2023 17:51:14 +0200 Subject: [PATCH] Adjust device_automation tests which create devices --- tests/components/device_automation/test_init.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/components/device_automation/test_init.py b/tests/components/device_automation/test_init.py index d0f013299b15a..65fee1053ae8e 100644 --- a/tests/components/device_automation/test_init.py +++ b/tests/components/device_automation/test_init.py @@ -1496,8 +1496,10 @@ async def test_automation_with_device_wrong_domain( module = module_cache["fake_integration.device_trigger"] module.async_validate_trigger_config = AsyncMock() + source_config_entry = MockConfigEntry(domain="not_fake_integration") + source_config_entry.add_to_hass(hass) device_entry = device_registry.async_get_or_create( - config_entry_id="not_fake_integration_config_entry", + config_entry_id=source_config_entry.entry_id, connections={(dr.CONNECTION_NETWORK_MAC, "12:34:56:AB:CD:EF")}, ) assert await async_setup_component(