uiprotect 7.6.1__py3-none-any.whl → 7.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of uiprotect might be problematic. Click here for more details.

uiprotect/data/devices.py CHANGED
@@ -1442,6 +1442,40 @@ class Camera(ProtectMotionDeviceModel):
1442
1442
  """Toggles vehicle smart detection. Requires camera to have smart detection"""
1443
1443
  return await self._set_object_detect(SmartDetectObjectType.VEHICLE, enabled)
1444
1444
 
1445
+ # endregion
1446
+ # region Face
1447
+
1448
+ @property
1449
+ def can_detect_face(self) -> bool:
1450
+ return SmartDetectObjectType.FACE in self.feature_flags.smart_detect_types
1451
+
1452
+ @property
1453
+ def is_face_detection_on(self) -> bool:
1454
+ """Is Face Detection available and enabled?"""
1455
+ return self._is_smart_enabled(SmartDetectObjectType.FACE)
1456
+
1457
+ @property
1458
+ def last_face_detect_event(self) -> Event | None:
1459
+ """Get the last face smart detection event."""
1460
+ return self.get_last_smart_detect_event(SmartDetectObjectType.FACE)
1461
+
1462
+ @property
1463
+ def last_face_detect(self) -> datetime | None:
1464
+ """Get the last face smart detection event."""
1465
+ return self.last_smart_detects.get(SmartDetectObjectType.FACE)
1466
+
1467
+ @property
1468
+ def is_face_currently_detected(self) -> bool:
1469
+ """Is face currently being detected"""
1470
+ return self._is_smart_detected(SmartDetectObjectType.FACE)
1471
+
1472
+ async def set_face_detection(self, enabled: bool) -> None:
1473
+ """Toggles face smart detection. Requires camera to have smart detection"""
1474
+ return await self._set_object_detect(
1475
+ SmartDetectObjectType.FACE,
1476
+ enabled,
1477
+ )
1478
+
1445
1479
  # endregion
1446
1480
  # region License Plate
1447
1481
 
uiprotect/data/nvr.py CHANGED
@@ -1361,6 +1361,11 @@ class NVR(ProtectDeviceModel):
1361
1361
  """
1362
1362
  return self._is_smart_enabled(SmartDetectObjectType.VEHICLE)
1363
1363
 
1364
+ @property
1365
+ def is_global_face_detection_on(self) -> bool:
1366
+ """Is Face Detection available and enabled?"""
1367
+ return self._is_smart_enabled(SmartDetectObjectType.FACE)
1368
+
1364
1369
  @property
1365
1370
  def is_global_license_plate_detection_on(self) -> bool:
1366
1371
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: uiprotect
3
- Version: 7.6.1
3
+ Version: 7.7.0
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  License: MIT
6
6
  Author: UI Protect Maintainers
@@ -19,8 +19,8 @@ uiprotect/data/__init__.py,sha256=audwJBjxRiYdNPeYlP6iofFIOq3gyQzh6VpDsOCM2dQ,29
19
19
  uiprotect/data/base.py,sha256=CXIxaJCJNpavadn6uF7vlhI4wxkfD8MNBGgR-smRA7k,35401
20
20
  uiprotect/data/bootstrap.py,sha256=ddNaKrTprN7Zq0ZE3O_F5whepUh6z9GqyrUWxLyZ0HE,23570
21
21
  uiprotect/data/convert.py,sha256=xEN878_hm0HZZCVYGwJSxcSp2as9zpkvsemVIibReOA,2628
22
- uiprotect/data/devices.py,sha256=s8OiHIN_OgqCKqSoy6ATd174sBsIIZk3U2IPa2-3rcE,114393
23
- uiprotect/data/nvr.py,sha256=fu6bWx2NpsUKhPUg7bZHshAnONp41zOL8tc39lypW4c,47520
22
+ uiprotect/data/devices.py,sha256=hGiyglHcsmMa0-9vrO8Usmf4WBtrR1GFo6pvaHoh3BA,115581
23
+ uiprotect/data/nvr.py,sha256=CPmqp3wQouTAGQxUDFghCHsYVWEFSrga1Hf2_HmHDgA,47707
24
24
  uiprotect/data/types.py,sha256=TDZwSKELUN0smXLB8uQkyNsHlB61j2ByijeblEt2Css,19220
25
25
  uiprotect/data/user.py,sha256=Del5LUmt5uCfAQMI9-kl_GaKm085oTLjxmcCrlEKXxc,10526
26
26
  uiprotect/data/websocket.py,sha256=m4EV1Qfh08eKOihy70ycViYgEQpeNSGZQJWdtGIYJDA,6791
@@ -32,8 +32,8 @@ uiprotect/test_util/__init__.py,sha256=HlQBgIgdtrvT-gQ5OWP92LbgVr_YzsD5NFImLRonU
32
32
  uiprotect/test_util/anonymize.py,sha256=f-8ijU-_y9r-uAbhIPn0f0I6hzJpAkvJzc8UpWihObI,8478
33
33
  uiprotect/utils.py,sha256=5Z30chqnQhQdtD1vabRtZXjBpeiJagL5KDuALQlWxk8,20559
34
34
  uiprotect/websocket.py,sha256=tEyenqblNXHcjWYuf4oRP1E7buNwx6zoECMwpBr-jig,8191
35
- uiprotect-7.6.1.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
36
- uiprotect-7.6.1.dist-info/METADATA,sha256=9-8pmonc3Ww_eH--eauV-lbDncRI9e4TTQoUAVQ54vk,11108
37
- uiprotect-7.6.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
38
- uiprotect-7.6.1.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
39
- uiprotect-7.6.1.dist-info/RECORD,,
35
+ uiprotect-7.7.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
36
+ uiprotect-7.7.0.dist-info/METADATA,sha256=IyYYadmmc57eAitIgqA3mr6KoJ7FeJYL_nVXe8hXBrM,11108
37
+ uiprotect-7.7.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
38
+ uiprotect-7.7.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
39
+ uiprotect-7.7.0.dist-info/RECORD,,