mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Bump pyunifiprotect to 5.0.2 (#113651)
This commit is contained in:
parent
885abe2fda
commit
0a26829ffc
@ -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(
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user