pysmarlaapi 0.6.1__tar.gz → 0.7.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pysmarlaapi
3
- Version: 0.6.1
3
+ Version: 0.7.0
4
4
  Summary: Swing2Sleep Smarla API
5
5
  Author-email: Robin Lintermann <robin.lintermann@explicatis.com>
6
6
  Requires-Python: >=3.11
@@ -1,4 +1,4 @@
1
- __version__ = "0.6.1"
1
+ __version__ = "0.7.0"
2
2
 
3
3
  from .classes import Connection
4
4
  from .federwiege import Federwiege
@@ -36,10 +36,16 @@ class Federwiege:
36
36
 
37
37
  self.available = False
38
38
 
39
- def get_service(self, service: str):
40
- if service not in self.services:
39
+ def get_service(self, key: str):
40
+ if key not in self.services:
41
41
  return None
42
- return self.services[service]
42
+ return self.services[key]
43
+
44
+ def get_property(self, service_key: str, prop_key: str):
45
+ service = self.get_service(service_key)
46
+ if not service:
47
+ return None
48
+ return service.get_property(prop_key)
43
49
 
44
50
  def connect(self):
45
51
  with self._lock:
File without changes
File without changes
File without changes