mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +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,
|
WSSubscriptionMessage,
|
||||||
)
|
)
|
||||||
from pyunifiprotect.exceptions import ClientError, NotAuthorized
|
from pyunifiprotect.exceptions import ClientError, NotAuthorized
|
||||||
|
from pyunifiprotect.utils import log_event
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
|
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__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
ProtectDeviceType = ProtectAdoptableDeviceModel | NVR
|
ProtectDeviceType = ProtectAdoptableDeviceModel | NVR
|
||||||
SMART_EVENTS = {
|
|
||||||
EventType.SMART_DETECT,
|
|
||||||
EventType.SMART_AUDIO_DETECT,
|
|
||||||
EventType.SMART_DETECT_LINE,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
@ -231,26 +227,7 @@ 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):
|
if _LOGGER.isEnabledFor(logging.DEBUG):
|
||||||
_LOGGER.debug("event WS msg: %s", obj.dict())
|
log_event(obj)
|
||||||
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,
|
|
||||||
)
|
|
||||||
|
|
||||||
if obj.type is EventType.DEVICE_ADOPTED:
|
if obj.type is EventType.DEVICE_ADOPTED:
|
||||||
if obj.metadata is not None and obj.metadata.device_id is not None:
|
if obj.metadata is not None and obj.metadata.device_id is not None:
|
||||||
device = self.api.bootstrap.get_device_from_id(
|
device = self.api.bootstrap.get_device_from_id(
|
||||||
|
@ -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==5.0.1", "unifi-discovery==1.1.8"],
|
"requirements": ["pyunifiprotect==5.0.2", "unifi-discovery==1.1.8"],
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
"manufacturer": "Ubiquiti Networks",
|
"manufacturer": "Ubiquiti Networks",
|
||||||
|
@ -2333,7 +2333,7 @@ pytrydan==0.4.0
|
|||||||
pyudev==0.23.2
|
pyudev==0.23.2
|
||||||
|
|
||||||
# homeassistant.components.unifiprotect
|
# homeassistant.components.unifiprotect
|
||||||
pyunifiprotect==5.0.1
|
pyunifiprotect==5.0.2
|
||||||
|
|
||||||
# homeassistant.components.uptimerobot
|
# homeassistant.components.uptimerobot
|
||||||
pyuptimerobot==22.2.0
|
pyuptimerobot==22.2.0
|
||||||
|
@ -1800,7 +1800,7 @@ pytrydan==0.4.0
|
|||||||
pyudev==0.23.2
|
pyudev==0.23.2
|
||||||
|
|
||||||
# homeassistant.components.unifiprotect
|
# homeassistant.components.unifiprotect
|
||||||
pyunifiprotect==5.0.1
|
pyunifiprotect==5.0.2
|
||||||
|
|
||||||
# homeassistant.components.uptimerobot
|
# homeassistant.components.uptimerobot
|
||||||
pyuptimerobot==22.2.0
|
pyuptimerobot==22.2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user