PyViCare 2.34.1__tar.gz → 2.36.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.
Files changed (29) hide show
  1. {pyvicare-2.34.1 → pyvicare-2.36.0}/PKG-INFO +3 -3
  2. pyvicare-2.36.0/PyViCare/PyViCareDevice.py +38 -0
  3. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareDeviceConfig.py +2 -0
  4. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareHeatingDevice.py +17 -8
  5. {pyvicare-2.34.1 → pyvicare-2.36.0}/pyproject.toml +8 -4
  6. pyvicare-2.34.1/PyViCare/PyViCareDevice.py +0 -17
  7. {pyvicare-2.34.1 → pyvicare-2.36.0}/LICENSE +0 -0
  8. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/Feature.py +0 -0
  9. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCare.py +0 -0
  10. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareAbstractOAuthManager.py +0 -0
  11. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareBrowserOAuthManager.py +0 -0
  12. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareCachedService.py +0 -0
  13. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareElectricalEnergySystem.py +0 -0
  14. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareFuelCell.py +0 -0
  15. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareGateway.py +0 -0
  16. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareGazBoiler.py +0 -0
  17. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareHeatCurveCalculation.py +0 -0
  18. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareHeatPump.py +0 -0
  19. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareHybrid.py +0 -0
  20. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareOAuthManager.py +0 -0
  21. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareOilBoiler.py +0 -0
  22. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCarePelletsBoiler.py +0 -0
  23. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareRadiatorActuator.py +0 -0
  24. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareRoomSensor.py +0 -0
  25. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareService.py +0 -0
  26. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareUtils.py +0 -0
  27. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/PyViCareVentilationDevice.py +0 -0
  28. {pyvicare-2.34.1 → pyvicare-2.36.0}/PyViCare/__init__.py +0 -0
  29. {pyvicare-2.34.1 → pyvicare-2.36.0}/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyViCare
3
- Version: 2.34.1
3
+ Version: 2.36.0
4
4
  Summary: Library to communicate with the Viessmann ViCare API.
5
5
  Home-page: https://github.com/openviess/PyViCare
6
6
  License: Apache-2.0
@@ -9,17 +9,17 @@ Author: Simon Gillet
9
9
  Author-email: mail+pyvicare@gillet.ninja
10
10
  Maintainer: Christopher Fenner
11
11
  Maintainer-email: fenner.christopher@gmail.com
12
- Requires-Python: >=3.8,<4.0
12
+ Requires-Python: >=3.9,<4.0
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: Apache Software License
15
15
  Classifier: Natural Language :: English
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
18
  Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
24
  Requires-Dist: authlib (>1.2.0)
25
25
  Requires-Dist: requests (>=2.31.0)
@@ -0,0 +1,38 @@
1
+ from PyViCare.PyViCareService import ViCareService
2
+ from PyViCare.PyViCareUtils import PyViCareNotSupportedFeatureError, handleNotSupported
3
+
4
+
5
+ class Device:
6
+ """This is the base class for all simple devices.
7
+ This class connects to the Viessmann ViCare API.
8
+ The authentication is done through OAuth2.
9
+ Note that currently, a new token is generated for each run.
10
+ """
11
+
12
+ def __init__(self, service: ViCareService) -> None:
13
+ self.service = service
14
+
15
+ @handleNotSupported
16
+ def getSerial(self):
17
+ return self.service.getProperty("device.serial")["properties"]["value"]["value"]
18
+
19
+ def isLegacyDevice(self) -> bool:
20
+ return self.service.hasRoles(["type:legacy"])
21
+
22
+ def isE3Device(self) -> bool:
23
+ return self.service.hasRoles(["type:E3"])
24
+
25
+ def isDomesticHotWaterDevice(self):
26
+ return self._isTypeDevice("heating.dhw")
27
+
28
+ def isSolarThermalDevice(self):
29
+ return self._isTypeDevice("heating.solar")
30
+
31
+ def isVentilationDevice(self):
32
+ return self._isTypeDevice("ventilation")
33
+
34
+ def _isTypeDevice(self, deviceType: str):
35
+ try:
36
+ return self.service.getProperty(deviceType)["isEnabled"] and self.service.getProperty(deviceType)["properties"]["active"]["value"]
37
+ except PyViCareNotSupportedFeatureError:
38
+ return False
@@ -84,6 +84,8 @@ class PyViCareDeviceConfig:
84
84
  (self.asPelletsBoiler, r"Vitoligno|Ecotronic|VBC550P", []),
85
85
  (self.asElectricalEnergySystem, r"E3_VitoCharge_03", ["type:ees"]),
86
86
  (self.asVentilation, r"E3_ViAir", ["type:ventilation"]),
87
+ (self.asVentilation, r"E3_ViAir", ["type:ventilation;central"]),
88
+ (self.asVentilation, r"E3_VitoPure", ["type:ventilation;purifier"]),
87
89
  (self.asRadiatorActuator, r"E3_RadiatorActuator", ["type:radiator"]),
88
90
  (self.asRoomSensor, r"E3_RoomSensor", ["type:climateSensor"]),
89
91
  (self.asGateway, r"E3_TCU41_x04", ["type:gateway;TCU100"]),
@@ -66,16 +66,30 @@ class HeatingDevice(Device):
66
66
  def getDomesticHotWaterConfiguredTemperature(self):
67
67
  return self.service.getProperty("heating.dhw.temperature.main")["properties"]["value"]["value"]
68
68
 
69
+ @handleNotSupported
70
+ def getDomesticHotWaterStorageTemperature(self):
71
+ return self.service.getProperty("heating.dhw.sensors.temperature.dhwCylinder")["properties"]["value"][
72
+ "value"]
73
+
69
74
  @handleNotSupported
70
75
  def getHotWaterStorageTemperatureTop(self):
71
76
  return self.service.getProperty("heating.dhw.sensors.temperature.dhwCylinder.top")["properties"]["value"][
72
77
  "value"]
73
78
 
79
+ @handleNotSupported
80
+ def getDomesticHotWaterStorageTemperatureMiddle(self):
81
+ return self.service.getProperty("heating.dhw.sensors.temperature.dhwCylinder.middle")["properties"]["value"][
82
+ "value"]
83
+
84
+ @handleNotSupported
85
+ def getDomesticHotWaterStorageTemperatureMidBottom(self):
86
+ return self.service.getProperty("heating.dhw.sensors.temperature.dhwCylinder.midBottom")["properties"]["value"][
87
+ "value"]
88
+
74
89
  @handleNotSupported
75
90
  def getHotWaterStorageTemperatureBottom(self):
76
- return \
77
- self.service.getProperty("heating.dhw.sensors.temperature.dhwCylinder.bottom")["properties"]["value"][
78
- "value"]
91
+ return self.service.getProperty("heating.dhw.sensors.temperature.dhwCylinder.bottom")["properties"]["value"][
92
+ "value"]
79
93
 
80
94
  @handleNotSupported
81
95
  def getDomesticHotWaterConfiguredTemperature2(self):
@@ -113,11 +127,6 @@ class HeatingDevice(Device):
113
127
 
114
128
  return None
115
129
 
116
- @handleNotSupported
117
- def getDomesticHotWaterStorageTemperature(self):
118
- return self.service.getProperty("heating.dhw.sensors.temperature.dhwCylinder")["properties"]["value"][
119
- "value"]
120
-
121
130
  @handleNotSupported
122
131
  def getDomesticHotWaterOutletTemperature(self):
123
132
  return self.service.getProperty("heating.dhw.sensors.temperature.outlet")["properties"]["value"]["value"]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "PyViCare"
3
- version = "2.34.1"
3
+ version = "2.36.0"
4
4
  description = "Library to communicate with the Viessmann ViCare API."
5
5
  authors = [
6
6
  "Simon Gillet <mail+pyvicare@gillet.ninja>"
@@ -23,6 +23,10 @@ keywords = [
23
23
  classifiers = [
24
24
  "Intended Audience :: Developers",
25
25
  "Natural Language :: English",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
26
30
  "Programming Language :: Python :: 3",
27
31
  "License :: OSI Approved :: Apache Software License",
28
32
  "Topic :: Software Development :: Libraries :: Python Modules",
@@ -38,7 +42,7 @@ Changelog = "https://github.com/openviess/PyViCare/releases"
38
42
 
39
43
  [tool.poetry.dependencies]
40
44
  authlib = ">1.2.0"
41
- python = "^3.8"
45
+ python = "^3.9"
42
46
  requests = ">=2.31.0"
43
47
 
44
48
  [tool.poetry.group.dev.dependencies]
@@ -46,8 +50,8 @@ codespell = "^2.3.0"
46
50
  mypy = "^1.11.2"
47
51
  pylint = "^3.2.6"
48
52
  pytest = "^8.3.2"
49
- pytest-cov = "^5.0.0"
50
- ruff = "^0.6.7"
53
+ pytest-cov = "^6.0.0"
54
+ ruff = "^0.7.0"
51
55
  types-requests = ">=2.31"
52
56
 
53
57
  [tool.mypy]
@@ -1,17 +0,0 @@
1
- from PyViCare.PyViCareService import ViCareService
2
- from PyViCare.PyViCareUtils import handleNotSupported
3
-
4
-
5
- class Device:
6
- """This is the base class for all simple devices.
7
- This class connects to the Viessmann ViCare API.
8
- The authentication is done through OAuth2.
9
- Note that currently, a new token is generated for each run.
10
- """
11
-
12
- def __init__(self, service: ViCareService) -> None:
13
- self.service = service
14
-
15
- @handleNotSupported
16
- def getSerial(self):
17
- return self.service.getProperty("device.serial")["properties"]["value"]["value"]
File without changes
File without changes
File without changes