From fb62b6f01effdafb6ba4fefd7b716ae4dbe7c37e Mon Sep 17 00:00:00 2001
From: "J. Nick Koston" <nick@koston.org>
Date: Sun, 21 Jan 2024 21:35:24 -1000
Subject: [PATCH] Fix unifi test_tracked_clients test (#108638)

Fix unifi test_tracked_clients client

This test relied on the sensor platform getting set up and creating
the device before the device_tracker platform was setup since the
device_tracker platform will disable the entity because there is
not matching device entry for it via

https://github.com/home-assistant/core/blob/4ee6735cbbf13c130ee7cf2ca99274141fafc0fc/homeassistant/components/device_tracker/config_entry.py#L336

There is no guarantee the sensor platform will get set up before
the device tracker platform so the test was subject to a race
where it would fail if the device tracker platform was setup first
---
 tests/components/unifi/conftest.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/components/unifi/conftest.py b/tests/components/unifi/conftest.py
index d48ff613902..0cddd505cd4 100644
--- a/tests/components/unifi/conftest.py
+++ b/tests/components/unifi/conftest.py
@@ -121,6 +121,7 @@ def mock_device_registry(hass):
             "00:00:00:00:00:03",
             "00:00:00:00:00:04",
             "00:00:00:00:00:05",
+            "00:00:00:00:00:06",
             "00:00:00:00:01:01",
             "00:00:00:00:02:02",
         )
-- 
GitLab