Detect Early Access versions of UniFi Protect and Warn User (#81758)

This commit is contained in:
Christopher Bailey 2022-11-13 10:34:29 -05:00 committed by GitHub
parent 8252d7f3b5
commit bfd2eb50b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 368 additions and 59 deletions

View file

@ -72,7 +72,9 @@ async def test_setup_multiple(
nvr.id
ufp.api.get_nvr = AsyncMock(return_value=nvr)
with patch("homeassistant.components.unifiprotect.ProtectApiClient") as mock_api:
with patch(
"homeassistant.components.unifiprotect.utils.ProtectApiClient"
) as mock_api:
mock_config = MockConfigEntry(
domain=DOMAIN,
data={
@ -194,7 +196,7 @@ async def test_setup_starts_discovery(
):
"""Test setting up will start discovery."""
with _patch_discovery(), patch(
"homeassistant.components.unifiprotect.ProtectApiClient"
"homeassistant.components.unifiprotect.utils.ProtectApiClient"
) as mock_api:
ufp_config_entry.add_to_hass(hass)
mock_api.return_value = ufp_client