diff --git a/tests/components/device_tracker/test_entities.py b/tests/components/device_tracker/test_entities.py index 4ea5d280b5b..960f9c18b08 100644 --- a/tests/components/device_tracker/test_entities.py +++ b/tests/components/device_tracker/test_entities.py @@ -25,9 +25,11 @@ async def test_scanner_entity_device_tracker( ) -> None: """Test ScannerEntity based device tracker.""" # Make device tied to other integration so device tracker entities get enabled + other_config_entry = MockConfigEntry(domain="not_fake_integration") + other_config_entry.add_to_hass(hass) dr.async_get(hass).async_get_or_create( name="Device from other integration", - config_entry_id=MockConfigEntry().entry_id, + config_entry_id=other_config_entry.entry_id, connections={(dr.CONNECTION_NETWORK_MAC, "ad:de:ef:be:ed:fe")}, )