diff --git a/tests/components/unifi/conftest.py b/tests/components/unifi/conftest.py
index 19574a9ab424fa972a41be631d54b67030e93b0c..ca0c855d1ab598d7c806731567c703f04a970843 100644
--- a/tests/components/unifi/conftest.py
+++ b/tests/components/unifi/conftest.py
@@ -59,6 +59,7 @@ def mock_device_registry(hass):
     """Mock device registry."""
     dev_reg = dr.async_get(hass)
     config_entry = MockConfigEntry(domain="something_else")
+    config_entry.add_to_hass(hass)
 
     for idx, device in enumerate(
         (