uiprotect 0.10.0__py3-none-any.whl → 0.10.1__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.

@@ -495,15 +495,12 @@ class Bootstrap(ProtectBaseObject):
495
495
  data = obj.unifi_dict_to_dict(data)
496
496
  old_obj = obj.copy()
497
497
  obj = obj.update_from_dict(deepcopy(data))
498
- now: datetime | None = None
499
498
 
500
499
  if isinstance(obj, Event):
501
500
  self.process_event(obj)
502
501
  elif isinstance(obj, Camera):
503
502
  if "last_ring" in data and obj.last_ring:
504
- if now is None:
505
- now = utc_now()
506
- is_recent = obj.last_ring + RECENT_EVENT_MAX >= now
503
+ is_recent = obj.last_ring + RECENT_EVENT_MAX >= utc_now()
507
504
  _LOGGER.debug("last_ring for %s (%s)", obj.id, is_recent)
508
505
  if is_recent:
509
506
  obj.set_ring_timeout()
@@ -512,9 +509,7 @@ class Bootstrap(ProtectBaseObject):
512
509
  and "alarm_triggered_at" in data
513
510
  and obj.alarm_triggered_at
514
511
  ):
515
- if now is None:
516
- now = utc_now()
517
- is_recent = obj.alarm_triggered_at + RECENT_EVENT_MAX >= now
512
+ is_recent = obj.alarm_triggered_at + RECENT_EVENT_MAX >= utc_now()
518
513
  _LOGGER.debug("alarm_triggered_at for %s (%s)", obj.id, is_recent)
519
514
  if is_recent:
520
515
  obj.set_alarm_timeout()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uiprotect
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  Home-page: https://github.com/uilibs/uiprotect
6
6
  License: MIT
@@ -15,7 +15,7 @@ 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
17
  uiprotect/data/base.py,sha256=ex-UC9CJUtzxMFqtYokSiXM8pNHVBqCzq7r8WrEf1Mw,37178
18
- uiprotect/data/bootstrap.py,sha256=fohRmBSWE7o7gvtKR7JFWekmw5bHAq0VikGcRwCwszo,22124
18
+ uiprotect/data/bootstrap.py,sha256=TzrwRfI4Jt0zDx_tKxGS6AM3xRixB8iHOVY7CgeM7Qg,21952
19
19
  uiprotect/data/convert.py,sha256=rOQplUMIdTMD2SbAx_iI9BNPDscnhDvyRVLEMDhtADg,2047
20
20
  uiprotect/data/devices.py,sha256=LHVBT8ihMAZen7gIlQNbiYxukRrBpi_TNKNmV_5R6Xc,111705
21
21
  uiprotect/data/nvr.py,sha256=OJso6oewA_jY7ovKbD2U2Onp1GqheT5bCW0F6dC53DQ,47570
@@ -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=kXEr1xEoPAwUYuVPd6QoVnTf8MQwzQXQQ4JLyJsiRfY,18219
32
32
  uiprotect/websocket.py,sha256=iMTdchymaCgVHsmY1bRbxkcymqt6WQircIHYNxCu178,7289
33
- uiprotect-0.10.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
- uiprotect-0.10.0.dist-info/METADATA,sha256=8gW9pzrxlBCtZCC1X_i4Eq5cncVnK7HYehwIgBaFpxU,10985
35
- uiprotect-0.10.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
- uiprotect-0.10.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
- uiprotect-0.10.0.dist-info/RECORD,,
33
+ uiprotect-0.10.1.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
+ uiprotect-0.10.1.dist-info/METADATA,sha256=XM-hvlQWsrZSuAVzlVtridjkbMY2Bh18YmSfrNhwiKc,10985
35
+ uiprotect-0.10.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
+ uiprotect-0.10.1.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
+ uiprotect-0.10.1.dist-info/RECORD,,