mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Bump unifiprotect to 4.8.1 (#91522)
This commit is contained in:
parent
273e1fd2be
commit
559ce6a275
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
import logging
|
import logging
|
||||||
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from aiohttp import CookieJar
|
from aiohttp import CookieJar
|
||||||
@ -28,6 +29,7 @@ from homeassistant.helpers.aiohttp_client import (
|
|||||||
async_create_clientsession,
|
async_create_clientsession,
|
||||||
async_get_clientsession,
|
async_get_clientsession,
|
||||||
)
|
)
|
||||||
|
from homeassistant.helpers.storage import STORAGE_DIR
|
||||||
from homeassistant.helpers.typing import DiscoveryInfoType
|
from homeassistant.helpers.typing import DiscoveryInfoType
|
||||||
from homeassistant.loader import async_get_integration
|
from homeassistant.loader import async_get_integration
|
||||||
from homeassistant.util.network import is_ip_address
|
from homeassistant.util.network import is_ip_address
|
||||||
@ -248,6 +250,7 @@ class ProtectFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
username=user_input[CONF_USERNAME],
|
username=user_input[CONF_USERNAME],
|
||||||
password=user_input[CONF_PASSWORD],
|
password=user_input[CONF_PASSWORD],
|
||||||
verify_ssl=verify_ssl,
|
verify_ssl=verify_ssl,
|
||||||
|
cache_dir=Path(self.hass.config.path(STORAGE_DIR, "unifiprotect_cache")),
|
||||||
)
|
)
|
||||||
|
|
||||||
errors = {}
|
errors = {}
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["pyunifiprotect", "unifi_discovery"],
|
"loggers": ["pyunifiprotect", "unifi_discovery"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["pyunifiprotect==4.7.0", "unifi-discovery==1.1.7"],
|
"requirements": ["pyunifiprotect==4.8.1", "unifi-discovery==1.1.7"],
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
"manufacturer": "Ubiquiti Networks",
|
"manufacturer": "Ubiquiti Networks",
|
||||||
|
@ -4,6 +4,7 @@ from __future__ import annotations
|
|||||||
from collections.abc import Generator, Iterable
|
from collections.abc import Generator, Iterable
|
||||||
import contextlib
|
import contextlib
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from pathlib import Path
|
||||||
import socket
|
import socket
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -27,6 +28,7 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.aiohttp_client import async_create_clientsession
|
from homeassistant.helpers.aiohttp_client import async_create_clientsession
|
||||||
|
from homeassistant.helpers.storage import STORAGE_DIR
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_ALL_UPDATES,
|
CONF_ALL_UPDATES,
|
||||||
@ -142,4 +144,5 @@ def async_create_api_client(
|
|||||||
override_connection_host=entry.options.get(CONF_OVERRIDE_CHOST, False),
|
override_connection_host=entry.options.get(CONF_OVERRIDE_CHOST, False),
|
||||||
ignore_stats=not entry.options.get(CONF_ALL_UPDATES, False),
|
ignore_stats=not entry.options.get(CONF_ALL_UPDATES, False),
|
||||||
ignore_unadopted=False,
|
ignore_unadopted=False,
|
||||||
|
cache_dir=Path(hass.config.path(STORAGE_DIR, "unifiprotect_cache")),
|
||||||
)
|
)
|
||||||
|
@ -2150,7 +2150,7 @@ pytrafikverket==0.2.3
|
|||||||
pyudev==0.23.2
|
pyudev==0.23.2
|
||||||
|
|
||||||
# homeassistant.components.unifiprotect
|
# homeassistant.components.unifiprotect
|
||||||
pyunifiprotect==4.7.0
|
pyunifiprotect==4.8.1
|
||||||
|
|
||||||
# homeassistant.components.uptimerobot
|
# homeassistant.components.uptimerobot
|
||||||
pyuptimerobot==22.2.0
|
pyuptimerobot==22.2.0
|
||||||
|
@ -1540,7 +1540,7 @@ pytrafikverket==0.2.3
|
|||||||
pyudev==0.23.2
|
pyudev==0.23.2
|
||||||
|
|
||||||
# homeassistant.components.unifiprotect
|
# homeassistant.components.unifiprotect
|
||||||
pyunifiprotect==4.7.0
|
pyunifiprotect==4.8.1
|
||||||
|
|
||||||
# homeassistant.components.uptimerobot
|
# homeassistant.components.uptimerobot
|
||||||
pyuptimerobot==22.2.0
|
pyuptimerobot==22.2.0
|
||||||
|
@ -7,6 +7,8 @@ from datetime import datetime, timedelta
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
from ipaddress import IPv4Address
|
from ipaddress import IPv4Address
|
||||||
import json
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
from tempfile import gettempdir
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
@ -105,6 +107,7 @@ def mock_ufp_client(bootstrap: Bootstrap):
|
|||||||
client.bootstrap = bootstrap
|
client.bootstrap = bootstrap
|
||||||
client._bootstrap = bootstrap
|
client._bootstrap = bootstrap
|
||||||
client.api_path = "/api"
|
client.api_path = "/api"
|
||||||
|
client.cache_dir = Path(gettempdir()) / "ufp_cache"
|
||||||
# functionality from API client tests actually need
|
# functionality from API client tests actually need
|
||||||
client._stream_response = partial(ProtectApiClient._stream_response, client)
|
client._stream_response = partial(ProtectApiClient._stream_response, client)
|
||||||
client.get_camera_video = partial(ProtectApiClient.get_camera_video, client)
|
client.get_camera_video = partial(ProtectApiClient.get_camera_video, client)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user