Bump pyunifiprotect to v4.22.5 (#106781)
This commit is contained in:
parent
e6d2721d1b
commit
39960caf36
11 changed files with 77 additions and 3 deletions
|
@ -643,4 +643,15 @@ class ProtectEventBinarySensor(EventEntityMixin, BinarySensorEntity):
|
||||||
or self._attr_extra_state_attributes != previous_extra_state_attributes
|
or self._attr_extra_state_attributes != previous_extra_state_attributes
|
||||||
or self._attr_available != previous_available
|
or self._attr_available != previous_available
|
||||||
):
|
):
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Updating state [%s (%s)] %s (%s, %s) -> %s (%s, %s)",
|
||||||
|
device.name,
|
||||||
|
device.mac,
|
||||||
|
previous_is_on,
|
||||||
|
previous_available,
|
||||||
|
previous_extra_state_attributes,
|
||||||
|
self._attr_is_on,
|
||||||
|
self._attr_available,
|
||||||
|
self._attr_extra_state_attributes,
|
||||||
|
)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
|
@ -206,4 +206,11 @@ class ProtectButton(ProtectDeviceEntity, ButtonEntity):
|
||||||
previous_available = self._attr_available
|
previous_available = self._attr_available
|
||||||
self._async_update_device_from_protect(device)
|
self._async_update_device_from_protect(device)
|
||||||
if self._attr_available != previous_available:
|
if self._attr_available != previous_available:
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Updating state [%s (%s)] %s -> %s",
|
||||||
|
device.name,
|
||||||
|
device.mac,
|
||||||
|
previous_available,
|
||||||
|
self._attr_available,
|
||||||
|
)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
|
@ -228,6 +228,8 @@ class ProtectData:
|
||||||
|
|
||||||
# trigger updates for camera that the event references
|
# trigger updates for camera that the event references
|
||||||
elif isinstance(obj, Event): # type: ignore[unreachable]
|
elif isinstance(obj, Event): # type: ignore[unreachable]
|
||||||
|
if _LOGGER.isEnabledFor(logging.DEBUG):
|
||||||
|
_LOGGER.debug("event WS msg: %s", obj.dict())
|
||||||
if obj.type in SMART_EVENTS:
|
if obj.type in SMART_EVENTS:
|
||||||
if obj.camera is not None:
|
if obj.camera is not None:
|
||||||
if obj.end is None:
|
if obj.end is None:
|
||||||
|
|
|
@ -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.22.4", "unifi-discovery==1.1.7"],
|
"requirements": ["pyunifiprotect==4.22.5", "unifi-discovery==1.1.7"],
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
"manufacturer": "Ubiquiti Networks",
|
"manufacturer": "Ubiquiti Networks",
|
||||||
|
|
|
@ -133,6 +133,17 @@ class ProtectMediaPlayer(ProtectDeviceEntity, MediaPlayerEntity):
|
||||||
or self._attr_volume_level != previous_volume_level
|
or self._attr_volume_level != previous_volume_level
|
||||||
or self._attr_available != previous_available
|
or self._attr_available != previous_available
|
||||||
):
|
):
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Updating state [%s (%s)] %s (%s, %s) -> %s (%s, %s)",
|
||||||
|
device.name,
|
||||||
|
device.mac,
|
||||||
|
previous_state,
|
||||||
|
previous_available,
|
||||||
|
previous_volume_level,
|
||||||
|
self._attr_state,
|
||||||
|
self._attr_available,
|
||||||
|
self._attr_volume_level,
|
||||||
|
)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async def async_set_volume_level(self, volume: float) -> None:
|
async def async_set_volume_level(self, volume: float) -> None:
|
||||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
import logging
|
||||||
|
|
||||||
from pyunifiprotect.data import (
|
from pyunifiprotect.data import (
|
||||||
Camera,
|
Camera,
|
||||||
|
@ -25,6 +26,8 @@ from .entity import ProtectDeviceEntity, async_all_device_entities
|
||||||
from .models import PermRequired, ProtectSetableKeysMixin, T
|
from .models import PermRequired, ProtectSetableKeysMixin, T
|
||||||
from .utils import async_dispatch_id as _ufpd
|
from .utils import async_dispatch_id as _ufpd
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class NumberKeysMixin:
|
class NumberKeysMixin:
|
||||||
|
@ -285,4 +288,13 @@ class ProtectNumbers(ProtectDeviceEntity, NumberEntity):
|
||||||
self._attr_native_value != previous_value
|
self._attr_native_value != previous_value
|
||||||
or self._attr_available != previous_available
|
or self._attr_available != previous_available
|
||||||
):
|
):
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Updating state [%s (%s)] %s (%s) -> %s (%s)",
|
||||||
|
device.name,
|
||||||
|
device.mac,
|
||||||
|
previous_value,
|
||||||
|
previous_available,
|
||||||
|
self._attr_native_value,
|
||||||
|
self._attr_available,
|
||||||
|
)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
|
@ -420,4 +420,15 @@ class ProtectSelects(ProtectDeviceEntity, SelectEntity):
|
||||||
or self._attr_options != previous_options
|
or self._attr_options != previous_options
|
||||||
or self._attr_available != previous_available
|
or self._attr_available != previous_available
|
||||||
):
|
):
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Updating state [%s (%s)] %s (%s, %s) -> %s (%s, %s)",
|
||||||
|
device.name,
|
||||||
|
device.mac,
|
||||||
|
previous_option,
|
||||||
|
previous_available,
|
||||||
|
previous_options,
|
||||||
|
self._attr_current_option,
|
||||||
|
self._attr_available,
|
||||||
|
self._attr_options,
|
||||||
|
)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
|
@ -730,6 +730,15 @@ class ProtectDeviceSensor(ProtectDeviceEntity, SensorEntity):
|
||||||
self._attr_native_value != previous_value
|
self._attr_native_value != previous_value
|
||||||
or self._attr_available != previous_available
|
or self._attr_available != previous_available
|
||||||
):
|
):
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Updating state [%s (%s)] %s (%s) -> %s (%s)",
|
||||||
|
device.name,
|
||||||
|
device.mac,
|
||||||
|
previous_value,
|
||||||
|
previous_available,
|
||||||
|
self._attr_native_value,
|
||||||
|
self._attr_available,
|
||||||
|
)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from pyunifiprotect.data import (
|
from pyunifiprotect.data import (
|
||||||
|
@ -27,6 +28,7 @@ from .entity import ProtectDeviceEntity, ProtectNVREntity, async_all_device_enti
|
||||||
from .models import PermRequired, ProtectSetableKeysMixin, T
|
from .models import PermRequired, ProtectSetableKeysMixin, T
|
||||||
from .utils import async_dispatch_id as _ufpd
|
from .utils import async_dispatch_id as _ufpd
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
ATTR_PREV_MIC = "prev_mic_level"
|
ATTR_PREV_MIC = "prev_mic_level"
|
||||||
ATTR_PREV_RECORD = "prev_record_mode"
|
ATTR_PREV_RECORD = "prev_record_mode"
|
||||||
|
|
||||||
|
@ -458,6 +460,15 @@ class ProtectSwitch(ProtectDeviceEntity, SwitchEntity):
|
||||||
self._attr_is_on != previous_is_on
|
self._attr_is_on != previous_is_on
|
||||||
or self._attr_available != previous_available
|
or self._attr_available != previous_available
|
||||||
):
|
):
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Updating state [%s (%s)] %s (%s) -> %s (%s)",
|
||||||
|
device.name,
|
||||||
|
device.mac,
|
||||||
|
previous_is_on,
|
||||||
|
previous_available,
|
||||||
|
self._attr_is_on,
|
||||||
|
self._attr_available,
|
||||||
|
)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2280,7 +2280,7 @@ pytrydan==0.4.0
|
||||||
pyudev==0.23.2
|
pyudev==0.23.2
|
||||||
|
|
||||||
# homeassistant.components.unifiprotect
|
# homeassistant.components.unifiprotect
|
||||||
pyunifiprotect==4.22.4
|
pyunifiprotect==4.22.5
|
||||||
|
|
||||||
# homeassistant.components.uptimerobot
|
# homeassistant.components.uptimerobot
|
||||||
pyuptimerobot==22.2.0
|
pyuptimerobot==22.2.0
|
||||||
|
|
|
@ -1726,7 +1726,7 @@ pytrydan==0.4.0
|
||||||
pyudev==0.23.2
|
pyudev==0.23.2
|
||||||
|
|
||||||
# homeassistant.components.unifiprotect
|
# homeassistant.components.unifiprotect
|
||||||
pyunifiprotect==4.22.4
|
pyunifiprotect==4.22.5
|
||||||
|
|
||||||
# homeassistant.components.uptimerobot
|
# homeassistant.components.uptimerobot
|
||||||
pyuptimerobot==22.2.0
|
pyuptimerobot==22.2.0
|
||||||
|
|
Loading…
Add table
Reference in a new issue