uiprotect 1.19.1__py3-none-any.whl → 1.19.2__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/api.py CHANGED
@@ -53,7 +53,7 @@ from .data import (
53
53
  )
54
54
  from .data.base import ProtectModelWithId
55
55
  from .data.devices import Chime
56
- from .data.types import IteratorCallback, ProgressCallback, RecordingMode
56
+ from .data.types import IteratorCallback, ProgressCallback
57
57
  from .exceptions import BadRequest, NotAuthorized, NvrError
58
58
  from .utils import (
59
59
  decode_token_cookie,
@@ -1123,23 +1123,6 @@ class ProtectApiClient(BaseApiClient):
1123
1123
  This is a great alternative if you need metadata about the NVR without connecting to the Websocket
1124
1124
  """
1125
1125
  data = await self.api_request_obj("bootstrap")
1126
- # fix for UniFi Protect bug, some cameras may come back with and old recording mode
1127
- # "motion" and "smartDetect" recording modes was combined into "detections" in Protect 1.20.0
1128
- call_again = False
1129
- for camera_dict in data["cameras"]:
1130
- if camera_dict.get("recordingSettings", {}).get("mode", "detections") in {
1131
- "motion",
1132
- "smartDetect",
1133
- }:
1134
- await self.update_device(
1135
- ModelType.CAMERA,
1136
- camera_dict["id"],
1137
- {"recordingSettings": {"mode": RecordingMode.DETECTIONS.value}},
1138
- )
1139
- call_again = True
1140
-
1141
- if call_again:
1142
- data = await self.api_request_obj("bootstrap")
1143
1126
  return Bootstrap.from_unifi_dict(**data, api=self)
1144
1127
 
1145
1128
  async def get_devices_raw(self, model_type: ModelType) -> list[dict[str, Any]]:
uiprotect/data/base.py CHANGED
@@ -483,7 +483,7 @@ class ProtectBaseObject(BaseModel):
483
483
  if (unifi_obj := getattr(cls, key)) is not None:
484
484
  value = unifi_obj.update_from_dict(item)
485
485
  else:
486
- value = None
486
+ value = unifi_objs[key](**item, api=api)
487
487
  elif has_unifi_lists and key in unifi_lists and isinstance(item, list):
488
488
  klass = unifi_lists[key]
489
489
  value = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uiprotect
3
- Version: 1.19.1
3
+ Version: 1.19.2
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  Home-page: https://github.com/uilibs/uiprotect
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  uiprotect/__init__.py,sha256=llnQNtiBfwQG8IkQXovvFz4LZeFjrJx7XdmmUhu3a9E,289
2
2
  uiprotect/__main__.py,sha256=C_bHCOkv5qj6WMy-6ELoY3Y6HDhLxOa1a30CzmbZhsg,462
3
- uiprotect/api.py,sha256=zVKTMieBqx3EM1sex5zzAj2J2k4pUlQQ_xF8nE6AS5s,66339
3
+ uiprotect/api.py,sha256=SvAni2arXGtP8HzvTljKNLclSfzpRL03RaEF8o1o6K4,65561
4
4
  uiprotect/cli/__init__.py,sha256=sSLW9keVQOkgFcMW18HTDjRrt9sJ0KWjn9DJDA6f9Pc,8658
5
5
  uiprotect/cli/backup.py,sha256=ZiS7RZnJGKI8TJKLW2cOUzkRM8nyTvE5Ov_jZZGtvSM,36708
6
6
  uiprotect/cli/base.py,sha256=zpTm2kyJe_GLixnv3Uadke__iRLh64AEwQzp-2hqS7g,7730
@@ -14,7 +14,7 @@ uiprotect/cli/nvr.py,sha256=TwxEg2XT8jXAbOqv6gc7KFXELKadeItEDYweSL4_-e8,4260
14
14
  uiprotect/cli/sensors.py,sha256=fQtcDJCVxs4VbAqcavgBy2ABiVxAW3GXtna6_XFBp2k,8153
15
15
  uiprotect/cli/viewers.py,sha256=2cyrp104ffIvgT0wYGIO0G35QMkEbFe7fSVqLwDXQYQ,2171
16
16
  uiprotect/data/__init__.py,sha256=OcfuJl2qXfHcj_mdnrHhzZ5tEIZrw8auziX5IE7dn-I,2938
17
- uiprotect/data/base.py,sha256=q5lpNJ4keAQ4oDjalwg9eL3kaVzEapfwtcTzZZlrN_M,35691
17
+ uiprotect/data/base.py,sha256=G9VIZ-ZkG83oxQbnGYrdJlrv0E6atAel90oEshmJiE8,35719
18
18
  uiprotect/data/bootstrap.py,sha256=ZieXqE0526F3iRbdJ1pRM6QclSatn_SmecfoOPS3nNg,21922
19
19
  uiprotect/data/convert.py,sha256=8h6Il_DhMkPRDPj9F_rA2UZIlTuchS3BQD24peKpk2A,2185
20
20
  uiprotect/data/devices.py,sha256=450T-8qXsFad0xNNnXwm3x53e09NT4dgqlefl7lrc2Q,110485
@@ -30,8 +30,8 @@ uiprotect/test_util/__init__.py,sha256=d2g7afa0LSdixQ0kjEDYwafDFME_UlW2LzxpamZ2B
30
30
  uiprotect/test_util/anonymize.py,sha256=f-8ijU-_y9r-uAbhIPn0f0I6hzJpAkvJzc8UpWihObI,8478
31
31
  uiprotect/utils.py,sha256=kVRJwvHP683Sjhi2pnxwCwbaRl_uMQ2qFYSvt9kpfoU,18426
32
32
  uiprotect/websocket.py,sha256=JHI_2EZeRPqPyQopsBZS0dr3tu0HaTiqeLazfBXhW_8,7339
33
- uiprotect-1.19.1.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
- uiprotect-1.19.1.dist-info/METADATA,sha256=gqaz3iBcOFl5LGsGh2pIp_6cOd4iV8-cOqN_LBOpo-A,10983
35
- uiprotect-1.19.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
- uiprotect-1.19.1.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
- uiprotect-1.19.1.dist-info/RECORD,,
33
+ uiprotect-1.19.2.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
+ uiprotect-1.19.2.dist-info/METADATA,sha256=T918SdgoHGWjrbbCtfLNB4rq6ORitfu0Unfzv5YBPBQ,10983
35
+ uiprotect-1.19.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
+ uiprotect-1.19.2.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
+ uiprotect-1.19.2.dist-info/RECORD,,