python-tado 0.18.5__tar.gz → 0.18.6__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.
Files changed (32) hide show
  1. {python_tado-0.18.5/python_tado.egg-info → python_tado-0.18.6}/PKG-INFO +21 -2
  2. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/interface/api/hops_tado.py +12 -0
  3. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/interface/api/my_tado.py +14 -0
  4. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/interface/interface.py +5 -0
  5. {python_tado-0.18.5 → python_tado-0.18.6}/README.md +19 -0
  6. {python_tado-0.18.5 → python_tado-0.18.6}/pyproject.toml +1 -1
  7. {python_tado-0.18.5 → python_tado-0.18.6/python_tado.egg-info}/PKG-INFO +21 -2
  8. {python_tado-0.18.5 → python_tado-0.18.6}/AUTHORS +0 -0
  9. {python_tado-0.18.5 → python_tado-0.18.6}/LICENSE +0 -0
  10. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/__init__.py +0 -0
  11. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/__main__.py +0 -0
  12. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/const.py +0 -0
  13. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/exceptions.py +0 -0
  14. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/http.py +0 -0
  15. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/interface/__init__.py +0 -0
  16. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/interface/api/__init__.py +0 -0
  17. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/logger.py +0 -0
  18. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/zone/__init__.py +0 -0
  19. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/zone/hops_zone.py +0 -0
  20. {python_tado-0.18.5 → python_tado-0.18.6}/PyTado/zone/my_zone.py +0 -0
  21. {python_tado-0.18.5 → python_tado-0.18.6}/python_tado.egg-info/SOURCES.txt +0 -0
  22. {python_tado-0.18.5 → python_tado-0.18.6}/python_tado.egg-info/dependency_links.txt +0 -0
  23. {python_tado-0.18.5 → python_tado-0.18.6}/python_tado.egg-info/entry_points.txt +0 -0
  24. {python_tado-0.18.5 → python_tado-0.18.6}/python_tado.egg-info/not-zip-safe +0 -0
  25. {python_tado-0.18.5 → python_tado-0.18.6}/python_tado.egg-info/requires.txt +0 -0
  26. {python_tado-0.18.5 → python_tado-0.18.6}/python_tado.egg-info/top_level.txt +0 -0
  27. {python_tado-0.18.5 → python_tado-0.18.6}/setup.cfg +0 -0
  28. {python_tado-0.18.5 → python_tado-0.18.6}/tests/test_hops_zone.py +0 -0
  29. {python_tado-0.18.5 → python_tado-0.18.6}/tests/test_http.py +0 -0
  30. {python_tado-0.18.5 → python_tado-0.18.6}/tests/test_my_tado.py +0 -0
  31. {python_tado-0.18.5 → python_tado-0.18.6}/tests/test_my_zone.py +0 -0
  32. {python_tado-0.18.5 → python_tado-0.18.6}/tests/test_tado_interface.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: python-tado
3
- Version: 0.18.5
3
+ Version: 0.18.6
4
4
  Summary: PyTado from chrism0dwk, modfied by w.malgadey, diplix, michaelarnauts, LenhartStephan, splifter, syssi, andersonshatch, Yippy, p0thi, Coffee2CodeNL, chiefdragon, FilBr, nikilase, albertomontesg, Moritz-Schmidt, palazzem
5
5
  Author-email: Chris Jewell <chrism0dwk@gmail.com>, "w.malgadey" <w.malgadey@gmail.com>, FilBr <filippo.barba@protonmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -743,6 +743,25 @@ cause discomfort and inconvenience to others.
743
743
  >>> t = Tado('my@username.com', 'mypassword')
744
744
  >>> climate = t.get_climate(zone=1)
745
745
 
746
+ ## Usage
747
+ ```python
748
+ """Example client for PyTado"""
749
+
750
+ from PyTado.interface.interface import Tado
751
+
752
+
753
+ def main() -> None:
754
+ """Retrieve all zones, once successfully logged in"""
755
+ tado = Tado(username="mail@email.com", password="password") # nosec
756
+ zones = tado.get_zones()
757
+ print(zones)
758
+
759
+
760
+ if __name__ == "__main__":
761
+ main()
762
+ ```
763
+ Note: for developers, you can create an `example_dev.py` file in the root of the project to test your changes. This file will be ignored by the `.gitignore` file.
764
+
746
765
  ## Contributing
747
766
 
748
767
  We are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature!
@@ -335,3 +335,15 @@ class TadoX(Tado):
335
335
  request.payload = {"temperatureOffset": offset}
336
336
 
337
337
  return self._http.request(request)
338
+
339
+ def set_child_lock(self, device_id, child_lock):
340
+ """ "
341
+ Set and toggle the child lock on the device.
342
+ """
343
+
344
+ request = TadoXRequest()
345
+ request.command = f"roomsAndDevices/devices/{device_id}"
346
+ request.action = Action.CHANGE
347
+ request.payload = {"childLockEnabled": child_lock}
348
+
349
+ self._http.request(request)
@@ -424,6 +424,20 @@ class Tado:
424
424
 
425
425
  self._http.request(request)
426
426
 
427
+ def set_child_lock(self, device_id, child_lock) -> None:
428
+ """
429
+ Sets the child lock on a device
430
+ """
431
+
432
+ request = TadoRequest()
433
+ request.command = "childLock"
434
+ request.action = Action.CHANGE
435
+ request.device = device_id
436
+ request.domain = Domain.DEVICES
437
+ request.payload = {"childLockEnabled": child_lock}
438
+
439
+ self._http.request(request)
440
+
427
441
  def set_auto(self) -> None:
428
442
  """
429
443
  Sets HomeState to AUTO
@@ -77,6 +77,11 @@ class Tado:
77
77
  """Gets zones information. (deprecated)"""
78
78
  return self.get_zones()
79
79
 
80
+ @deprecated("set_child_lock")
81
+ def setChildLock(self, device_id, enabled):
82
+ """Set the child lock for a device"""
83
+ return self.set_child_lock(device_id, enabled)
84
+
80
85
  @deprecated("get_zone_state")
81
86
  def getZoneState(self, zone):
82
87
  """Gets current state of Zone as a TadoZone object. (deprecated)"""
@@ -33,6 +33,25 @@ cause discomfort and inconvenience to others.
33
33
  >>> t = Tado('my@username.com', 'mypassword')
34
34
  >>> climate = t.get_climate(zone=1)
35
35
 
36
+ ## Usage
37
+ ```python
38
+ """Example client for PyTado"""
39
+
40
+ from PyTado.interface.interface import Tado
41
+
42
+
43
+ def main() -> None:
44
+ """Retrieve all zones, once successfully logged in"""
45
+ tado = Tado(username="mail@email.com", password="password") # nosec
46
+ zones = tado.get_zones()
47
+ print(zones)
48
+
49
+
50
+ if __name__ == "__main__":
51
+ main()
52
+ ```
53
+ Note: for developers, you can create an `example_dev.py` file in the root of the project to test your changes. This file will be ignored by the `.gitignore` file.
54
+
36
55
  ## Contributing
37
56
 
38
57
  We are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature!
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-tado"
7
- version = "0.18.5"
7
+ version = "0.18.6"
8
8
  description = "PyTado from chrism0dwk, modfied by w.malgadey, diplix, michaelarnauts, LenhartStephan, splifter, syssi, andersonshatch, Yippy, p0thi, Coffee2CodeNL, chiefdragon, FilBr, nikilase, albertomontesg, Moritz-Schmidt, palazzem"
9
9
  authors = [
10
10
  { name = "Chris Jewell", email = "chrism0dwk@gmail.com" },
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: python-tado
3
- Version: 0.18.5
3
+ Version: 0.18.6
4
4
  Summary: PyTado from chrism0dwk, modfied by w.malgadey, diplix, michaelarnauts, LenhartStephan, splifter, syssi, andersonshatch, Yippy, p0thi, Coffee2CodeNL, chiefdragon, FilBr, nikilase, albertomontesg, Moritz-Schmidt, palazzem
5
5
  Author-email: Chris Jewell <chrism0dwk@gmail.com>, "w.malgadey" <w.malgadey@gmail.com>, FilBr <filippo.barba@protonmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -743,6 +743,25 @@ cause discomfort and inconvenience to others.
743
743
  >>> t = Tado('my@username.com', 'mypassword')
744
744
  >>> climate = t.get_climate(zone=1)
745
745
 
746
+ ## Usage
747
+ ```python
748
+ """Example client for PyTado"""
749
+
750
+ from PyTado.interface.interface import Tado
751
+
752
+
753
+ def main() -> None:
754
+ """Retrieve all zones, once successfully logged in"""
755
+ tado = Tado(username="mail@email.com", password="password") # nosec
756
+ zones = tado.get_zones()
757
+ print(zones)
758
+
759
+
760
+ if __name__ == "__main__":
761
+ main()
762
+ ```
763
+ Note: for developers, you can create an `example_dev.py` file in the root of the project to test your changes. This file will be ignored by the `.gitignore` file.
764
+
746
765
  ## Contributing
747
766
 
748
767
  We are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature!
File without changes
File without changes
File without changes