harbor-python 1.2.0__py3-none-any.whl → 1.2.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.
harbor/mqtt.py CHANGED
@@ -1,9 +1,11 @@
1
+ from __future__ import annotations
2
+
1
3
  import asyncio
2
4
  import json
3
5
  import logging
4
6
  import sys
5
7
  from collections.abc import Awaitable, Callable
6
- from typing import Any
8
+ from typing import TYPE_CHECKING, Any
7
9
  from uuid import uuid4
8
10
 
9
11
  from aiomqtt import Client, MqttError
@@ -12,6 +14,9 @@ from .config import HarborCameraConfig
12
14
  from .data.mqtt_models import GetCameraSettingsRequest, SettingsEvent
13
15
  from .utils import get_camera_host, get_ssl_cache_key, get_ssl_context
14
16
 
17
+ if TYPE_CHECKING:
18
+ from .events import HarborEvent
19
+
15
20
  _LOGGER = logging.getLogger(__name__)
16
21
 
17
22
  DEFAULT_CONNECTION_GRACE_PERIOD = 90.0
@@ -26,7 +31,7 @@ class HarborMQTTClient:
26
31
  self,
27
32
  config: HarborCameraConfig,
28
33
  topics: list[str],
29
- message_handler: Callable[[str, Any], Awaitable[None]],
34
+ message_handler: Callable[[str, Any], Awaitable[HarborEvent | None]],
30
35
  client_id: str | None = None,
31
36
  ssl_context_cache: dict | None = None,
32
37
  on_connection_change: Callable[[bool], Awaitable[None]] | None = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: harbor-python
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: A package to locally connect to a Harbor Sleep Camera
5
5
  Author: Andres Garcia, Lash-L
6
6
  License-Expression: Apache-2.0
@@ -3,7 +3,7 @@ harbor/config.py,sha256=LXMDaTC_0Z9wF_vTXJG9C0vQ0XHXo4EuFL0-Kwa4-S4,1373
3
3
  harbor/core.py,sha256=Alm6ojRBCibsQ5xGGyaAOQimi-_kE6Q6fuS2ZAxzaNM,3468
4
4
  harbor/device.py,sha256=YvaFWieXJ-EzQJU8VQo_ZERl65CynITTAnMFto-PF_I,5933
5
5
  harbor/events.py,sha256=4Y3JT_NP1x8rUR7U6n2-LvAENt9zpqD4jVy28AAYo4Q,20400
6
- harbor/mqtt.py,sha256=ZhGuR90U449q4OY9WCCJVLIuYVEHrG1uT32EGjux7rU,16712
6
+ harbor/mqtt.py,sha256=43QzJrocLGBWNad7uH4mSm2M9YR15xtmSTvIviwrkXA,16832
7
7
  harbor/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  harbor/state.py,sha256=jQDLV8zpkLV2f6zR4LuOtk_B5BtGdp-8dq4NyGZCa-8,1210
9
9
  harbor/utils.py,sha256=7A3Tn1aZ93SlxRKY-0b-50ntQL4Pw1j5bXwkJvnarpY,3312
@@ -11,7 +11,7 @@ harbor/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  harbor/data/mqtt_models.py,sha256=OF36ZoUCOeoaKp4TPggM6HCbowgtkH1zLFTozVJUZYY,4314
12
12
  harbor/devices/camera.py,sha256=ciq8ynsAaZgW0CWYjKiJGAZwk04pNz4uYfnsN0GT0O4,8429
13
13
  harbor/devices/monitor.py,sha256=hzx4lu92h3i_34QyYK392gE7CihqERiOZuLhyzDtDk0,452
14
- harbor_python-1.2.0.dist-info/METADATA,sha256=ZEPjl-fqvicWCUsIa5dbS18zAFgm5YeYXbGUqvMFe9A,688
15
- harbor_python-1.2.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
16
- harbor_python-1.2.0.dist-info/licenses/LICENSE,sha256=QEOXEfrOQetemKy4k1WN5XCApJdpiRtyV5jLMSToVVw,11344
17
- harbor_python-1.2.0.dist-info/RECORD,,
14
+ harbor_python-1.2.1.dist-info/METADATA,sha256=NOeg3ZjAJU9Ji4zRwKXA_ouXAdHnHcn3m9UVNpx9ixQ,688
15
+ harbor_python-1.2.1.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
16
+ harbor_python-1.2.1.dist-info/licenses/LICENSE,sha256=QEOXEfrOQetemKy4k1WN5XCApJdpiRtyV5jLMSToVVw,11344
17
+ harbor_python-1.2.1.dist-info/RECORD,,