Bump pyunifiprotect to v4.22.5 (#106781)
This commit is contained in:
parent
80f8102b83
commit
ce54a1259a
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_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()
|
||||
|
|
|
@ -206,4 +206,11 @@ class ProtectButton(ProtectDeviceEntity, ButtonEntity):
|
|||
previous_available = self._attr_available
|
||||
self._async_update_device_from_protect(device)
|
||||
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()
|
||||
|
|
|
@ -228,6 +228,8 @@ class ProtectData:
|
|||
|
||||
# trigger updates for camera that the event references
|
||||
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.camera is not None:
|
||||
if obj.end is None:
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
"iot_class": "local_push",
|
||||
"loggers": ["pyunifiprotect", "unifi_discovery"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["pyunifiprotect==4.22.4", "unifi-discovery==1.1.7"],
|
||||
"requirements": ["pyunifiprotect==4.22.5", "unifi-discovery==1.1.7"],
|
||||
"ssdp": [
|
||||
{
|
||||
"manufacturer": "Ubiquiti Networks",
|
||||
|
|
|
@ -133,6 +133,17 @@ class ProtectMediaPlayer(ProtectDeviceEntity, MediaPlayerEntity):
|
|||
or self._attr_volume_level != previous_volume_level
|
||||
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()
|
||||
|
||||
async def async_set_volume_level(self, volume: float) -> None:
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
|
||||
from dataclasses import dataclass
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from pyunifiprotect.data import (
|
||||
Camera,
|
||||
|
@ -25,6 +26,8 @@ from .entity import ProtectDeviceEntity, async_all_device_entities
|
|||
from .models import PermRequired, ProtectSetableKeysMixin, T
|
||||
from .utils import async_dispatch_id as _ufpd
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class NumberKeysMixin:
|
||||
|
@ -285,4 +288,13 @@ class ProtectNumbers(ProtectDeviceEntity, NumberEntity):
|
|||
self._attr_native_value != previous_value
|
||||
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()
|
||||
|
|
|
@ -420,4 +420,15 @@ class ProtectSelects(ProtectDeviceEntity, SelectEntity):
|
|||
or self._attr_options != previous_options
|
||||
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()
|
||||
|
|
|
@ -730,6 +730,15 @@ class ProtectDeviceSensor(ProtectDeviceEntity, SensorEntity):
|
|||
self._attr_native_value != previous_value
|
||||
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()
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from pyunifiprotect.data import (
|
||||
|
@ -27,6 +28,7 @@ from .entity import ProtectDeviceEntity, ProtectNVREntity, async_all_device_enti
|
|||
from .models import PermRequired, ProtectSetableKeysMixin, T
|
||||
from .utils import async_dispatch_id as _ufpd
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
ATTR_PREV_MIC = "prev_mic_level"
|
||||
ATTR_PREV_RECORD = "prev_record_mode"
|
||||
|
||||
|
@ -458,6 +460,15 @@ class ProtectSwitch(ProtectDeviceEntity, SwitchEntity):
|
|||
self._attr_is_on != previous_is_on
|
||||
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()
|
||||
|
||||
|
||||
|
|
|
@ -2283,7 +2283,7 @@ pytrydan==0.4.0
|
|||
pyudev==0.23.2
|
||||
|
||||
# homeassistant.components.unifiprotect
|
||||
pyunifiprotect==4.22.4
|
||||
pyunifiprotect==4.22.5
|
||||
|
||||
# homeassistant.components.uptimerobot
|
||||
pyuptimerobot==22.2.0
|
||||
|
|
|
@ -1726,7 +1726,7 @@ pytrydan==0.4.0
|
|||
pyudev==0.23.2
|
||||
|
||||
# homeassistant.components.unifiprotect
|
||||
pyunifiprotect==4.22.4
|
||||
pyunifiprotect==4.22.5
|
||||
|
||||
# homeassistant.components.uptimerobot
|
||||
pyuptimerobot==22.2.0
|
||||
|
|
Loading…
Add table
Reference in a new issue