pysmarlaapi 0.8.0__py3-none-any.whl → 0.8.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.0"
1
+ __version__ = "0.8.1"
2
2
 
3
3
  from .classes import Connection
4
4
  from .federwiege import Federwiege
@@ -22,10 +22,10 @@ class Property(Generic[_VT]):
22
22
  async with self.lock:
23
23
  self.listeners.remove(listener)
24
24
 
25
- async def notify_listeners(self, value):
25
+ async def notify_listeners(self):
26
26
  async with self.lock:
27
27
  for listener in self.listeners:
28
- await listener(value)
28
+ await listener(self.value)
29
29
 
30
30
  def get(self) -> _VT:
31
31
  return self.value
@@ -16,7 +16,7 @@ class OscillationProperty(Property[list[int]]):
16
16
  async def on_callback(self, args):
17
17
  value = args[0]["value"]
18
18
  self.set(value, push=False)
19
- await self.notify_listeners(value)
19
+ await self.notify_listeners()
20
20
 
21
21
  def __init__(self, hub: ConnectionHub):
22
22
  super().__init__(hub, [0, 0])
@@ -33,7 +33,7 @@ class ActivityProperty(Property[int]):
33
33
  async def on_callback(self, args):
34
34
  value = args[0]["value"]
35
35
  self.set(value, push=False)
36
- await self.notify_listeners(value)
36
+ await self.notify_listeners()
37
37
 
38
38
  def __init__(self, hub: ConnectionHub):
39
39
  super().__init__(hub, 0)
@@ -50,7 +50,7 @@ class SwingCountProperty(Property[int]):
50
50
  async def on_callback(self, args):
51
51
  value = args[0]["value"]
52
52
  self.set(value, push=False)
53
- await self.notify_listeners(value)
53
+ await self.notify_listeners()
54
54
 
55
55
  def __init__(self, hub: ConnectionHub):
56
56
  super().__init__(hub, 0)
@@ -16,7 +16,7 @@ class SwingActiveProperty(Property[bool]):
16
16
  async def on_callback(self, args):
17
17
  value = args[0]["value"]
18
18
  self.set(value, push=False)
19
- await self.notify_listeners(value)
19
+ await self.notify_listeners()
20
20
 
21
21
  def __init__(self, hub: ConnectionHub):
22
22
  super().__init__(hub, False)
@@ -36,7 +36,7 @@ class IntensityProperty(Property[int]):
36
36
  async def on_callback(self, args):
37
37
  value = args[0]["value"]
38
38
  self.set(value, push=False)
39
- await self.notify_listeners(value)
39
+ await self.notify_listeners()
40
40
 
41
41
  def __init__(self, hub: ConnectionHub):
42
42
  super().__init__(hub, 0)
@@ -56,7 +56,7 @@ class SmartModeProperty(Property[bool]):
56
56
  async def on_callback(self, args):
57
57
  value = args[0]["value"]
58
58
  self.set(value, push=False)
59
- await self.notify_listeners(value)
59
+ await self.notify_listeners()
60
60
 
61
61
  def __init__(self, hub: ConnectionHub):
62
62
  super().__init__(hub, False)
@@ -15,7 +15,7 @@ class DisplayNameProperty(Property[str]):
15
15
  async def on_callback(self, args):
16
16
  value = args[0]["value"]
17
17
  self.set(value, push=False)
18
- await self.notify_listeners(value)
18
+ await self.notify_listeners()
19
19
 
20
20
  def __init__(self, hub: ConnectionHub):
21
21
  super().__init__(hub, "Smarla")
@@ -32,7 +32,7 @@ class VersionProperty(Property[str]):
32
32
  async def on_callback(self, args):
33
33
  value = args[0]["value"]
34
34
  self.set(value, push=False)
35
- await self.notify_listeners(value)
35
+ await self.notify_listeners()
36
36
 
37
37
  def __init__(self, hub: ConnectionHub):
38
38
  super().__init__(hub, "1.0.0")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pysmarlaapi
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Swing2Sleep Smarla API
5
5
  Author-email: Robin Lintermann <robin.lintermann@explicatis.com>
6
6
  Requires-Python: >=3.11
@@ -1,17 +1,17 @@
1
- pysmarlaapi/__init__.py,sha256=HvcRKoj47bC-HWwzoPDGj7tN2GXOTcgzsYtnknEE0iE,90
1
+ pysmarlaapi/__init__.py,sha256=ub-L44yMnTV_M5NVqNHPbNfkV-I9cQtWosQ-yxN7rj8,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=D98z9T6CGqRBzRjNbeWpxrMQKE5bv5-k1nDCQRMDfbI,1041
8
+ pysmarlaapi/federwiege/classes/property.py,sha256=l7WRvzqxOgzc7y2Cr_FJcbgvVxVHmBS5DqKmKM26mXw,1039
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=ENPULIDBcqyOGCh3Yz6iv86XWBLOEG6yr36J2EZQq1M,1724
12
- pysmarlaapi/federwiege/services/babywiege_service.py,sha256=vUXRaqOE3pLSZ1HVYZAdh__ApU0Z29_m65928NduC4o,2011
13
- pysmarlaapi/federwiege/services/info_service.py,sha256=WIH6tALDCKI82PFtNTq8dIMAotnS7wNxjXaTLiyyHeM,1208
14
- pysmarlaapi-0.8.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
- pysmarlaapi-0.8.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
16
- pysmarlaapi-0.8.0.dist-info/METADATA,sha256=92WQrS8n9yu1vrL1udf7QRFrvfKIpcZhQHJSVqwK840,1106
17
- pysmarlaapi-0.8.0.dist-info/RECORD,,
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.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
+ pysmarlaapi-0.8.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
16
+ pysmarlaapi-0.8.1.dist-info/METADATA,sha256=q0hNAGjNUmh8eUddfIEd4N1bN4q0yK5bXPvmntcb60g,1106
17
+ pysmarlaapi-0.8.1.dist-info/RECORD,,