uiprotect 0.3.9__py3-none-any.whl → 0.4.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/api.py CHANGED
@@ -16,7 +16,6 @@ from ipaddress import IPv4Address, IPv6Address
16
16
  from pathlib import Path
17
17
  from typing import Any, Literal, cast
18
18
  from urllib.parse import urljoin
19
- from uuid import UUID
20
19
 
21
20
  import aiofiles
22
21
  import aiohttp
@@ -647,7 +646,7 @@ class BaseApiClient:
647
646
  def _process_ws_message(self, msg: aiohttp.WSMessage) -> None:
648
647
  raise NotImplementedError
649
648
 
650
- def _get_last_update_id(self) -> UUID | None:
649
+ def _get_last_update_id(self) -> str | None:
651
650
  raise NotImplementedError
652
651
 
653
652
 
@@ -833,7 +832,7 @@ class ProtectApiClient(BaseApiClient):
833
832
  except Exception:
834
833
  _LOGGER.exception("Exception while running subscription handler")
835
834
 
836
- def _get_last_update_id(self) -> UUID | None:
835
+ def _get_last_update_id(self) -> str | None:
837
836
  if self._bootstrap is None:
838
837
  return None
839
838
  return self._bootstrap.last_update_id
@@ -8,7 +8,6 @@ from copy import deepcopy
8
8
  from dataclasses import dataclass
9
9
  from datetime import datetime
10
10
  from typing import Any, cast
11
- from uuid import UUID
12
11
 
13
12
  from aiohttp.client_exceptions import ServerDisconnectedError
14
13
 
@@ -179,7 +178,7 @@ class Bootstrap(ProtectBaseObject):
179
178
  sensors: dict[str, Sensor]
180
179
  doorlocks: dict[str, Doorlock]
181
180
  chimes: dict[str, Chime]
182
- last_update_id: UUID
181
+ last_update_id: str
183
182
 
184
183
  # TODO:
185
184
  # schedules
@@ -546,7 +545,7 @@ class Bootstrap(ProtectBaseObject):
546
545
 
547
546
  action, data = self._get_frame_data(packet)
548
547
  if action["newUpdateId"] is not None:
549
- self.last_update_id = UUID(action["newUpdateId"])
548
+ self.last_update_id = action["newUpdateId"]
550
549
 
551
550
  if action["modelKey"] not in ModelType.values():
552
551
  _LOGGER.debug("Unknown model type: %s", action["modelKey"])
uiprotect/data/types.py CHANGED
@@ -305,6 +305,7 @@ class DoorbellMessageType(str, ValuesEnumMixin, enum.Enum):
305
305
  LEAVE_PACKAGE_AT_DOOR = "LEAVE_PACKAGE_AT_DOOR"
306
306
  DO_NOT_DISTURB = "DO_NOT_DISTURB"
307
307
  CUSTOM_MESSAGE = "CUSTOM_MESSAGE"
308
+ IMAGE = "IMAGE"
308
309
 
309
310
 
310
311
  @enum.unique
@@ -8,7 +8,6 @@ import struct
8
8
  import zlib
9
9
  from dataclasses import dataclass
10
10
  from typing import TYPE_CHECKING, Any
11
- from uuid import UUID
12
11
 
13
12
  import orjson
14
13
 
@@ -40,7 +39,7 @@ class WSAction(str, enum.Enum):
40
39
  @dataclass
41
40
  class WSSubscriptionMessage:
42
41
  action: WSAction
43
- new_update_id: UUID
42
+ new_update_id: str
44
43
  changed_data: dict[str, Any]
45
44
  new_obj: ProtectModelWithId | None = None
46
45
  old_obj: ProtectModelWithId | None = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uiprotect
3
- Version: 0.3.9
3
+ Version: 0.4.0
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=tzcxK6cOIIkFEtST4Zjq3bafYTFWtwnaL92DgypjFi8,307
2
2
  uiprotect/__main__.py,sha256=T69KE5W4zek6qeNEL8_Fq2DEfBc04SqSuIOJpiW4ydE,471
3
- uiprotect/api.py,sha256=mmAmPBs0Zev_2KWLO_l5QU8pFOsFzuYt-OZMvfV3mq0,65694
3
+ uiprotect/api.py,sha256=7ET5UEpi5djVXGmbRLGpz2ww8-DuT1f_zFubmiR2Ovw,65670
4
4
  uiprotect/cli/__init__.py,sha256=tmwtYrhM8rjOw8noKD6NALl_2Nu3xIycDuQyEKD5oMk,8832
5
5
  uiprotect/cli/backup.py,sha256=Mtjd2f0w7zjIeLkJILKxiBnZJYXypzC9gpyAmBZ8sq0,36746
6
6
  uiprotect/cli/base.py,sha256=dE6vYb4nLAYbUdHwcKkN7I3iXqTjz84jfHGnsLmk_Ds,7762
@@ -15,13 +15,13 @@ uiprotect/cli/sensors.py,sha256=CE77weDkYepo9eEs1J0ModIs3pWNWmesjAq3rlmiez0,8177
15
15
  uiprotect/cli/viewers.py,sha256=SZlolZH3kkcWKjATrA37TCVZYRpF0t4cCccrC8vIv-M,2195
16
16
  uiprotect/data/__init__.py,sha256=38Kb1DVi4kv9FTTwugatPNSWLiIp6uvUlTMZRQp2jTY,3050
17
17
  uiprotect/data/base.py,sha256=YJ0iofoy1K3EG55npokU3T2CLRC8kctutfIy0Sq_6Sg,37850
18
- uiprotect/data/bootstrap.py,sha256=bRuJ4QhizoVd_dbmpO5Wpd2NlHHkqtrPz4mO-e11A9M,21850
18
+ uiprotect/data/bootstrap.py,sha256=fyC6CoYnm90r1VAWSuOe8FFh8ULaGSv6jNMQcpKPBZA,21821
19
19
  uiprotect/data/convert.py,sha256=f8QkwZnlNbV_W-YognlDvZ1gQKp5yFuC50396hcu6DU,2127
20
20
  uiprotect/data/devices.py,sha256=3UOOzFXgJP7AOPKTE1SgPcLy37W4DmSNflIFiyi8tSE,111792
21
21
  uiprotect/data/nvr.py,sha256=JZja0QiT91Eu8-lw_M0Ora1KGNXhbG5dVNLN8YdeSw0,47677
22
- uiprotect/data/types.py,sha256=XYFop75mOip0dbJeejitX9r5MJDFmblCk__QiWuDzCQ,15769
22
+ uiprotect/data/types.py,sha256=MTi9dVzKTp_8XtAmWKtbZujwE5plKGHdjglFGcJ4Yxs,15789
23
23
  uiprotect/data/user.py,sha256=HZJh9IOXS23kM-szTn7dGGsRZz9w2_9DqltL90gcMoE,7095
24
- uiprotect/data/websocket.py,sha256=HKAze9b9soOS03_2zixRTR7jlFIA4ph9wMZEo15q6NY,6107
24
+ uiprotect/data/websocket.py,sha256=3iU8hcH5GsVrGLoDjhXcv7zOKmXrMuQUqUud_ZsF6vw,6084
25
25
  uiprotect/exceptions.py,sha256=kgn0cRM6lTtgLza09SDa3ZiX6ue1QqHCOogQ4qu6KTQ,965
26
26
  uiprotect/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  uiprotect/release_cache.json,sha256=NamnSFy78hOWY0DPO87J9ELFCAN6NnVquv8gQO75ZG4,386
@@ -30,8 +30,8 @@ uiprotect/test_util/__init__.py,sha256=sSEXu6_pwdYNQSCYtftpX1Dy1S8XYOvhrpECYRxeK
30
30
  uiprotect/test_util/anonymize.py,sha256=AGYELhDC4BrdK0deI6zh5jFp3SuM_HvAWLeoxFHSiwg,8486
31
31
  uiprotect/utils.py,sha256=xP8t0wEBIGS___LUYRNnQuXvUbjKDbsOnnSwWDzphSw,18124
32
32
  uiprotect/websocket.py,sha256=iMTdchymaCgVHsmY1bRbxkcymqt6WQircIHYNxCu178,7289
33
- uiprotect-0.3.9.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
- uiprotect-0.3.9.dist-info/METADATA,sha256=gFwYXGoVnp8lat9iM3sMWWLVMktZ2Vqk5-0t5a2-MFI,10984
35
- uiprotect-0.3.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
- uiprotect-0.3.9.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
- uiprotect-0.3.9.dist-info/RECORD,,
33
+ uiprotect-0.4.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
+ uiprotect-0.4.0.dist-info/METADATA,sha256=1NRqhJzgvOha1OGPOpbp46MUiKzd4KxZs94IP2nH4GA,10984
35
+ uiprotect-0.4.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
+ uiprotect-0.4.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
+ uiprotect-0.4.0.dist-info/RECORD,,