uiprotect 1.7.1__py3-none-any.whl → 1.7.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/data/base.py +11 -5
- {uiprotect-1.7.1.dist-info → uiprotect-1.7.2.dist-info}/METADATA +1 -1
- {uiprotect-1.7.1.dist-info → uiprotect-1.7.2.dist-info}/RECORD +6 -6
- {uiprotect-1.7.1.dist-info → uiprotect-1.7.2.dist-info}/LICENSE +0 -0
- {uiprotect-1.7.1.dist-info → uiprotect-1.7.2.dist-info}/WHEEL +0 -0
- {uiprotect-1.7.1.dist-info → uiprotect-1.7.2.dist-info}/entry_points.txt +0 -0
uiprotect/data/base.py
CHANGED
|
@@ -66,6 +66,8 @@ if TYPE_CHECKING:
|
|
|
66
66
|
ProtectObject = TypeVar("ProtectObject", bound="ProtectBaseObject")
|
|
67
67
|
RECENT_EVENT_MAX = timedelta(seconds=30)
|
|
68
68
|
EVENT_PING_INTERVAL = timedelta(seconds=3)
|
|
69
|
+
EVENT_PING_INTERVAL_SECONDS = EVENT_PING_INTERVAL.total_seconds()
|
|
70
|
+
|
|
69
71
|
_LOGGER = logging.getLogger(__name__)
|
|
70
72
|
|
|
71
73
|
|
|
@@ -787,10 +789,14 @@ class ProtectModelWithId(ProtectModel):
|
|
|
787
789
|
raise
|
|
788
790
|
|
|
789
791
|
if force_emit:
|
|
790
|
-
|
|
792
|
+
self._emit_message(updated)
|
|
791
793
|
|
|
792
794
|
async def emit_message(self, updated: dict[str, Any]) -> None:
|
|
793
|
-
"""
|
|
795
|
+
"""Emits fake WS message for ProtectApiClient to process."""
|
|
796
|
+
self._emit_message(updated)
|
|
797
|
+
|
|
798
|
+
def _emit_message(self, updated: dict[str, Any]) -> None:
|
|
799
|
+
"""Emits fake WS message for ProtectApiClient to process."""
|
|
794
800
|
if updated == {}:
|
|
795
801
|
_LOGGER.debug("Event ping callback started for %s", self.id)
|
|
796
802
|
|
|
@@ -877,9 +883,9 @@ class ProtectDeviceModel(ProtectModelWithId):
|
|
|
877
883
|
_LOGGER.debug("Event ping timer started for %s", self.id)
|
|
878
884
|
loop = asyncio.get_event_loop()
|
|
879
885
|
self._callback_ping = loop.call_later(
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
886
|
+
EVENT_PING_INTERVAL_SECONDS,
|
|
887
|
+
self._emit_message,
|
|
888
|
+
{},
|
|
883
889
|
)
|
|
884
890
|
|
|
885
891
|
async def set_name(self, name: str | None) -> None:
|
|
@@ -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=
|
|
17
|
+
uiprotect/data/base.py,sha256=mC-Nsr9xWSy7oshIOxgo5qQCjfYZutFQWIjTY39w2sQ,37909
|
|
18
18
|
uiprotect/data/bootstrap.py,sha256=UxDAo8hz-Rh8XvgfYvUslrWelGFZ5JQ6bnixT4wKJR0,21468
|
|
19
19
|
uiprotect/data/convert.py,sha256=8h6Il_DhMkPRDPj9F_rA2UZIlTuchS3BQD24peKpk2A,2185
|
|
20
20
|
uiprotect/data/devices.py,sha256=Nq3bOko5PFf5LvEBoD4JV8kmbq50laRdh3VHMWX7t-0,111809
|
|
@@ -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=6OLY8hNiCzk418PjJJIlFW7jjPzVt1vxBKEzBSqMeTk,18418
|
|
32
32
|
uiprotect/websocket.py,sha256=IzDPyqbzrkOMREvahN-e2zdvVD0VABSCWy6jSoCwOT0,7299
|
|
33
|
-
uiprotect-1.7.
|
|
34
|
-
uiprotect-1.7.
|
|
35
|
-
uiprotect-1.7.
|
|
36
|
-
uiprotect-1.7.
|
|
37
|
-
uiprotect-1.7.
|
|
33
|
+
uiprotect-1.7.2.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
|
|
34
|
+
uiprotect-1.7.2.dist-info/METADATA,sha256=yw8NXd8D4F6yKONwFd-HxZaDrAxZ38Q7Nw_kXHn2-6Y,10984
|
|
35
|
+
uiprotect-1.7.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
36
|
+
uiprotect-1.7.2.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
|
|
37
|
+
uiprotect-1.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|