Bump pyunifiprotect to 5.0.2 (#113651)

This commit is contained in:
Christopher Bailey 2024-03-16 22:15:18 -04:00 committed by GitHub
parent 885abe2fda
commit 0a26829ffc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 28 deletions

View File

@ -20,6 +20,7 @@ from pyunifiprotect.data import (
WSSubscriptionMessage,
)
from pyunifiprotect.exceptions import ClientError, NotAuthorized
from pyunifiprotect.utils import log_event
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
@ -42,11 +43,6 @@ from .utils import async_dispatch_id as _ufpd, async_get_devices_by_type
_LOGGER = logging.getLogger(__name__)
ProtectDeviceType = ProtectAdoptableDeviceModel | NVR
SMART_EVENTS = {
EventType.SMART_DETECT,
EventType.SMART_AUDIO_DETECT,
EventType.SMART_DETECT_LINE,
}
@callback
@ -231,26 +227,7 @@ 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:
_LOGGER.debug(
"%s (%s): New smart detection started for %s (%s)",
obj.camera.name,
obj.camera.mac,
obj.smart_detect_types,
obj.id,
)
else:
_LOGGER.debug(
"%s (%s): Smart detection ended for %s (%s)",
obj.camera.name,
obj.camera.mac,
obj.smart_detect_types,
obj.id,
)
log_event(obj)
if obj.type is EventType.DEVICE_ADOPTED:
if obj.metadata is not None and obj.metadata.device_id is not None:
device = self.api.bootstrap.get_device_from_id(

View File

@ -41,7 +41,7 @@
"iot_class": "local_push",
"loggers": ["pyunifiprotect", "unifi_discovery"],
"quality_scale": "platinum",
"requirements": ["pyunifiprotect==5.0.1", "unifi-discovery==1.1.8"],
"requirements": ["pyunifiprotect==5.0.2", "unifi-discovery==1.1.8"],
"ssdp": [
{
"manufacturer": "Ubiquiti Networks",

View File

@ -2333,7 +2333,7 @@ pytrydan==0.4.0
pyudev==0.23.2
# homeassistant.components.unifiprotect
pyunifiprotect==5.0.1
pyunifiprotect==5.0.2
# homeassistant.components.uptimerobot
pyuptimerobot==22.2.0

View File

@ -1800,7 +1800,7 @@ pytrydan==0.4.0
pyudev==0.23.2
# homeassistant.components.unifiprotect
pyunifiprotect==5.0.1
pyunifiprotect==5.0.2
# homeassistant.components.uptimerobot
pyuptimerobot==22.2.0