pysmarlaapi 0.8.2__py3-none-any.whl → 0.9.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 pysmarlaapi might be problematic. Click here for more details.

pysmarlaapi/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.8.2"
1
+ __version__ = "0.9.1"
2
2
 
3
3
  from .classes import Connection
4
4
  from .federwiege import Federwiege
@@ -8,9 +8,10 @@ _VT = TypeVar("_VT")
8
8
 
9
9
  class Property(Generic[_VT]):
10
10
 
11
- def __init__(self, hub: ConnectionHub, value: _VT):
11
+ value: _VT | None = None
12
+
13
+ def __init__(self, hub: ConnectionHub):
12
14
  self.hub = hub
13
- self.value: _VT = value
14
15
  self.listeners = set()
15
16
  self.lock = asyncio.Lock()
16
17
 
@@ -27,7 +28,7 @@ class Property(Generic[_VT]):
27
28
  for listener in self.listeners:
28
29
  await listener(self.value)
29
30
 
30
- def get(self) -> _VT:
31
+ def get(self) -> _VT | None:
31
32
  return self.value
32
33
 
33
34
  def set(self, new_value: _VT, push=True):
@@ -19,7 +19,7 @@ class OscillationProperty(Property[list[int]]):
19
19
  await self.notify_listeners()
20
20
 
21
21
  def __init__(self, hub: ConnectionHub):
22
- super().__init__(hub, [0, 0])
22
+ super().__init__(hub)
23
23
 
24
24
  def pull(self):
25
25
  self.hub.send_serialized_data("GetOscillation")
@@ -36,7 +36,7 @@ class ActivityProperty(Property[int]):
36
36
  await self.notify_listeners()
37
37
 
38
38
  def __init__(self, hub: ConnectionHub):
39
- super().__init__(hub, 0)
39
+ super().__init__(hub)
40
40
 
41
41
  def pull(self):
42
42
  self.hub.send_serialized_data("GetActivity")
@@ -53,7 +53,7 @@ class SwingCountProperty(Property[int]):
53
53
  await self.notify_listeners()
54
54
 
55
55
  def __init__(self, hub: ConnectionHub):
56
- super().__init__(hub, 0)
56
+ super().__init__(hub)
57
57
 
58
58
  def pull(self):
59
59
  self.hub.send_serialized_data("GetSwingCount")
@@ -19,7 +19,7 @@ class SwingActiveProperty(Property[bool]):
19
19
  await self.notify_listeners()
20
20
 
21
21
  def __init__(self, hub: ConnectionHub):
22
- super().__init__(hub, False)
22
+ super().__init__(hub)
23
23
 
24
24
  def pull(self):
25
25
  self.hub.send_serialized_data("GetSwingActive")
@@ -39,7 +39,7 @@ class IntensityProperty(Property[int]):
39
39
  await self.notify_listeners()
40
40
 
41
41
  def __init__(self, hub: ConnectionHub):
42
- super().__init__(hub, 0)
42
+ super().__init__(hub)
43
43
 
44
44
  def pull(self):
45
45
  self.hub.send_serialized_data("GetIntensity")
@@ -59,7 +59,7 @@ class SmartModeProperty(Property[bool]):
59
59
  await self.notify_listeners()
60
60
 
61
61
  def __init__(self, hub: ConnectionHub):
62
- super().__init__(hub, False)
62
+ super().__init__(hub)
63
63
 
64
64
  def pull(self):
65
65
  self.hub.send_serialized_data("GetSmartMode")
@@ -18,7 +18,7 @@ class DisplayNameProperty(Property[str]):
18
18
  await self.notify_listeners()
19
19
 
20
20
  def __init__(self, hub: ConnectionHub):
21
- super().__init__(hub, "Smarla")
21
+ super().__init__(hub)
22
22
 
23
23
  def pull(self):
24
24
  self.hub.send_serialized_data("GetDisplayName")
@@ -35,7 +35,7 @@ class VersionProperty(Property[str]):
35
35
  await self.notify_listeners()
36
36
 
37
37
  def __init__(self, hub: ConnectionHub):
38
- super().__init__(hub, "1.0.0")
38
+ super().__init__(hub)
39
39
 
40
40
  def pull(self):
41
41
  self.hub.send_serialized_data("GetVersion")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pysmarlaapi
3
- Version: 0.8.2
3
+ Version: 0.9.1
4
4
  Summary: Swing2Sleep Smarla API
5
5
  Author-email: Robin Lintermann <robin.lintermann@explicatis.com>
6
6
  Requires-Python: >=3.11
@@ -11,9 +11,9 @@ Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Classifier: Programming Language :: Python :: 3.13
13
13
  License-File: LICENSE
14
- Requires-Dist: aiohttp~=3.11
15
- Requires-Dist: jsonpickle~=4.0.0
16
- Requires-Dist: pysignalr~=1.1.0
14
+ Requires-Dist: aiohttp>=3.11
15
+ Requires-Dist: jsonpickle>=4.0.0
16
+ Requires-Dist: pysignalr>=1.3.0
17
17
  Project-URL: Issues, https://github.com/Explicatis-GmbH/pysmarlaapi/issues
18
18
  Project-URL: Repository, https://github.com/Explicatis-GmbH/pysmarlaapi
19
19
 
@@ -1,17 +1,17 @@
1
- pysmarlaapi/__init__.py,sha256=B5qFFsYEk8vUBtocLex0gGw6nx731Hc3Scjj0GLtOp8,90
1
+ pysmarlaapi/__init__.py,sha256=DxRsHg0CP39FBqqwPEtyduVrDLlWtAXakNrogZrywmA,90
2
2
  pysmarlaapi/classes/__init__.py,sha256=N-ZV3Id_t5ciovUlPUGCk5SLLiMUonRoQZWpfOU4ZsM,69
3
3
  pysmarlaapi/classes/auth_token.py,sha256=dpo0lBT9Advm3Iyxu-fT9sq078U2OxgXXBuF5gbBZkM,942
4
4
  pysmarlaapi/classes/connection.py,sha256=vVC0Ur0KQUb4pNDVuCYnfk-JXs-O-FwYVO-2y1E2g6g,1551
5
5
  pysmarlaapi/connection_hub/__init__.py,sha256=NR5xql57L0Xs0JfeEVOVLITWSaVMblEo6pcvB7fn5TQ,4443
6
6
  pysmarlaapi/federwiege/__init__.py,sha256=7Fl_GnwN6GbS8fhkHdfMhuYFospKnap40pvUtSGIeoE,1933
7
7
  pysmarlaapi/federwiege/classes/__init__.py,sha256=DFJJVOKpra40S4ZX_oq2RyMazg6Nx0c8hoPggmj1bXA,60
8
- pysmarlaapi/federwiege/classes/property.py,sha256=l7WRvzqxOgzc7y2Cr_FJcbgvVxVHmBS5DqKmKM26mXw,1039
8
+ pysmarlaapi/federwiege/classes/property.py,sha256=S5Zzo9cXDJMFcQG1vCw1eO-oqeSpQs2YjxWouN_KRkU,1032
9
9
  pysmarlaapi/federwiege/classes/service.py,sha256=Y0OQxtQLaHp4qY8Vthj0zRroPoYTiD2WA9ZR96teZTo,632
10
10
  pysmarlaapi/federwiege/services/__init__.py,sha256=bJuOsk0lw9WWxB1NZodRTL8Pm_Ra8CuTCxNh33WzxkQ,132
11
- pysmarlaapi/federwiege/services/analyser_service.py,sha256=6sRtevXTTZGSIp_ZVsvTGjRbHM8KHcscfPMo0v-ySEM,1709
12
- pysmarlaapi/federwiege/services/babywiege_service.py,sha256=jhGWpvjLChCfy9d7o3m_K5bP8qMrOPN23M80qzS8P8I,1996
13
- pysmarlaapi/federwiege/services/info_service.py,sha256=B0wxFaDSnSSNkCjr7Oo7fDhhBDXUZQaQDE4JyRvIQ0Y,1198
14
- pysmarlaapi-0.8.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
- pysmarlaapi-0.8.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
16
- pysmarlaapi-0.8.2.dist-info/METADATA,sha256=mRThO2-F_rq5MyQ820sJYgH3FJprFCViW_CG6JuzCeU,1103
17
- pysmarlaapi-0.8.2.dist-info/RECORD,,
11
+ pysmarlaapi/federwiege/services/analyser_service.py,sha256=xRPvSO5FdwX-gqWLWYQq8zvQSPnkE5Y3d-kG7N3awgg,1695
12
+ pysmarlaapi/federwiege/services/babywiege_service.py,sha256=6u0fSsRoWfv6A0Qad1WLD2yeRHMGnwbKVOJLxEqwzGE,1979
13
+ pysmarlaapi/federwiege/services/info_service.py,sha256=XqMSMU3BusB85V0O93rzliuJCK_H-PE4kXqJX-v7Kc4,1179
14
+ pysmarlaapi-0.9.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
+ pysmarlaapi-0.9.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
16
+ pysmarlaapi-0.9.1.dist-info/METADATA,sha256=jv4aLE3FWXVKR24G9YLNODNnfvNqxDggLWggO_97gIU,1103
17
+ pysmarlaapi-0.9.1.dist-info/RECORD,,