PyViCare 2.66.0__tar.gz → 2.67.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 (37) hide show
  1. {pyvicare-2.66.0 → pyvicare-2.67.0}/PKG-INFO +8 -1
  2. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareDevice.py +20 -0
  3. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareGazBoiler.py +25 -0
  4. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareHeatPump.py +10 -3
  5. {pyvicare-2.66.0 → pyvicare-2.67.0}/README.md +7 -0
  6. {pyvicare-2.66.0 → pyvicare-2.67.0}/pyproject.toml +3 -3
  7. {pyvicare-2.66.0 → pyvicare-2.67.0}/.gitignore +0 -0
  8. {pyvicare-2.66.0 → pyvicare-2.67.0}/LICENSE +0 -0
  9. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/Feature.py +0 -0
  10. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCare.py +0 -0
  11. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareAbstractOAuthManager.py +0 -0
  12. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareBrowserOAuthManager.py +0 -0
  13. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareCachedService.py +0 -0
  14. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareCachedServiceBase.py +0 -0
  15. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareCachedServiceViaGateway.py +0 -0
  16. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareDeviceConfig.py +0 -0
  17. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareElectricalEnergySystem.py +0 -0
  18. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareEvent.py +0 -0
  19. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareFloorHeating.py +0 -0
  20. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareFuelCell.py +0 -0
  21. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareGateway.py +0 -0
  22. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareHeatCurveCalculation.py +0 -0
  23. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareHeatingDevice.py +0 -0
  24. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareHybrid.py +0 -0
  25. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareOAuthManager.py +0 -0
  26. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareOilBoiler.py +0 -0
  27. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCarePelletsBoiler.py +0 -0
  28. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareRadiatorActuator.py +0 -0
  29. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareRepeater.py +0 -0
  30. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareRoomControl.py +0 -0
  31. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareRoomSensor.py +0 -0
  32. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareService.py +0 -0
  33. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareServiceViaGateway.py +0 -0
  34. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareUtils.py +0 -0
  35. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareVentilationDevice.py +0 -0
  36. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/PyViCareWaterTreatment.py +0 -0
  37. {pyvicare-2.66.0 → pyvicare-2.67.0}/PyViCare/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: PyViCare
3
- Version: 2.66.0
3
+ Version: 2.67.0
4
4
  Summary: Library to communicate with the Viessmann ViCare API.
5
5
  Project-URL: Homepage, https://github.com/openviess/PyViCare
6
6
  Project-URL: Repository, https://github.com/openviess/PyViCare
@@ -98,6 +98,13 @@ asks the API for its gateway serial and filters the page by device id, so
98
98
  `limit` counts that gateway's events. Paging and other event types are on
99
99
  `device.service.fetch_events()`.
100
100
 
101
+ `getDeviceStatusMessages()`, `getDeviceServiceMessages()` and
102
+ `getDeviceInfoMessages()` return the current status, service and info messages
103
+ the same way `getDeviceErrors()` returns the errors, each entry with
104
+ `errorCode`, `priority` and `timestamp`. An empty list means there is no such
105
+ message right now; a device without the feature raises
106
+ `PyViCareNotSupportedFeatureError`.
107
+
101
108
  ## Types of heatings
102
109
 
103
110
  - Use `asGazBoiler` for gas heatings
@@ -36,6 +36,26 @@ class Device:
36
36
  def getDeviceErrors(self) -> list[Any]:
37
37
  return list[Any](self.getProperty("device.messages.errors.raw")["properties"]["entries"]["value"])
38
38
 
39
+ @handleNotSupported
40
+ def getDeviceStatusMessages(self) -> list[Any]:
41
+ return list[Any](self.getProperty("device.messages.status.raw")["properties"]["entries"]["value"])
42
+
43
+ @handleNotSupported
44
+ def getDeviceServiceMessages(self) -> list[Any]:
45
+ return list[Any](self.getProperty("device.messages.service.raw")["properties"]["entries"]["value"])
46
+
47
+ @handleNotSupported
48
+ def getDeviceInfoMessages(self) -> list[Any]:
49
+ return list[Any](self.getProperty("device.messages.info.raw")["properties"]["entries"]["value"])
50
+
51
+ @handleNotSupported
52
+ def getMalfunctionLockActive(self) -> bool:
53
+ return bool(self.getProperty("device.lock.malfunction")["properties"]["active"]["value"])
54
+
55
+ @handleNotSupported
56
+ def getExternalLockActive(self) -> bool:
57
+ return bool(self.getProperty("device.lock.external")["properties"]["active"]["value"])
58
+
39
59
  # Power consumption limitation (§14a EnWG):
40
60
  @handleNotSupported
41
61
  def getPowerConsumptionLimit(self) -> int:
@@ -8,6 +8,12 @@ from PyViCare.PyViCareHeatingDevice import (
8
8
  from PyViCare.PyViCareUtils import handleNotSupported
9
9
 
10
10
 
11
+ def _burner_stop_reasons(feature: Any) -> list[str]:
12
+ # Every reason comes as "<reason>AllStops"; "timeAllStops" is no reason.
13
+ return sorted(name.removesuffix("AllStops") for name in feature["properties"]
14
+ if name.endswith("AllStops") and name != "timeAllStops")
15
+
16
+
11
17
  class GazBoiler(HeatingDevice):
12
18
 
13
19
  @property
@@ -313,6 +319,25 @@ class GazBoiler(HeatingDevice):
313
319
  # Returns heating supply pressure
314
320
  return float(self.getProperty("heating.sensors.pressure.supply")["properties"]["value"]["value"])
315
321
 
322
+ # Burner stops per reason (device.timeseries.burner.stops):
323
+ @handleNotSupported
324
+ def getBurnerStopReasons(self) -> list[str]:
325
+ return _burner_stop_reasons(self.getProperty("device.timeseries.burner.stops"))
326
+
327
+ @handleNotSupported
328
+ def getBurnerStopsAll(self, reason: str) -> int:
329
+ return int(self.getProperty("device.timeseries.burner.stops")["properties"][f"{reason}AllStops"]["value"])
330
+
331
+ # Burner stops per reason during domestic hot water heating (device.timeseries.dhw.burner.stops):
332
+ @handleNotSupported
333
+ def getDomesticHotWaterBurnerStopReasons(self) -> list[str]:
334
+ return _burner_stop_reasons(self.getProperty("device.timeseries.dhw.burner.stops"))
335
+
336
+ @handleNotSupported
337
+ def getDomesticHotWaterBurnerStopsAll(self, reason: str) -> int:
338
+ return int(self.getProperty("device.timeseries.dhw.burner.stops")["properties"][f"{reason}AllStops"]["value"])
339
+
340
+
316
341
  class GazBurner(HeatingDeviceWithComponent):
317
342
 
318
343
  @property
@@ -278,13 +278,20 @@ class HeatPump(HeatingDevice, VentilationDevice):
278
278
  def getAvailableVentilationPrograms(self):
279
279
  return self.getVentilationPrograms()
280
280
 
281
+ def _getDomesticHotWaterHysteresisValue(self, name: str) -> float:
282
+ # some devices serve a value they do not have as {"type": "any", "value": null}
283
+ value = self.getProperty("heating.dhw.temperature.hysteresis")["properties"][name]["value"]
284
+ if value is None:
285
+ raise PyViCareNotSupportedFeatureError(name)
286
+ return float(value)
287
+
281
288
  @handleNotSupported
282
289
  def getDomesticHotWaterHysteresisUnit(self) -> str:
283
290
  return str(self.getProperty("heating.dhw.temperature.hysteresis")["properties"]["value"]["unit"])
284
291
 
285
292
  @handleNotSupported
286
293
  def getDomesticHotWaterHysteresis(self) -> float:
287
- return float(self.getProperty("heating.dhw.temperature.hysteresis")["properties"]["value"]["value"])
294
+ return self._getDomesticHotWaterHysteresisValue("value")
288
295
 
289
296
  @handleNotSupported
290
297
  def getDomesticHotWaterHysteresisMin(self) -> float:
@@ -315,7 +322,7 @@ class HeatPump(HeatingDevice, VentilationDevice):
315
322
 
316
323
  @handleNotSupported
317
324
  def getDomesticHotWaterHysteresisSwitchOn(self) -> float:
318
- return float(self.getProperty("heating.dhw.temperature.hysteresis")["properties"]["switchOnValue"]["value"])
325
+ return self._getDomesticHotWaterHysteresisValue("switchOnValue")
319
326
 
320
327
  @handleNotSupported
321
328
  def getDomesticHotWaterHysteresisSwitchOnMin(self) -> float:
@@ -346,7 +353,7 @@ class HeatPump(HeatingDevice, VentilationDevice):
346
353
 
347
354
  @handleNotSupported
348
355
  def getDomesticHotWaterHysteresisSwitchOff(self) -> float:
349
- return float(self.getProperty("heating.dhw.temperature.hysteresis")["properties"]["switchOffValue"]["value"])
356
+ return self._getDomesticHotWaterHysteresisValue("switchOffValue")
350
357
 
351
358
  @handleNotSupported
352
359
  def getDomesticHotWaterHysteresisSwitchOffMin(self) -> float:
@@ -66,6 +66,13 @@ asks the API for its gateway serial and filters the page by device id, so
66
66
  `limit` counts that gateway's events. Paging and other event types are on
67
67
  `device.service.fetch_events()`.
68
68
 
69
+ `getDeviceStatusMessages()`, `getDeviceServiceMessages()` and
70
+ `getDeviceInfoMessages()` return the current status, service and info messages
71
+ the same way `getDeviceErrors()` returns the errors, each entry with
72
+ `errorCode`, `priority` and `timestamp`. An empty list means there is no such
73
+ message right now; a device without the feature raises
74
+ `PyViCareNotSupportedFeatureError`.
75
+
69
76
  ## Types of heatings
70
77
 
71
78
  - Use `asGazBoiler` for gas heatings
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "PyViCare"
3
- version = "2.66.0"
3
+ version = "2.67.0"
4
4
  description = "Library to communicate with the Viessmann ViCare API."
5
5
  authors = [{ name = "Simon Gillet", email = "mail+pyvicare@gillet.ninja" }]
6
6
  requires-python = ">=3.11"
@@ -46,10 +46,10 @@ Changelog = "https://github.com/openviess/PyViCare/releases"
46
46
  dev = [
47
47
  "codespell==2.4.3",
48
48
  "mypy==2.4.1",
49
- "pylint==4.1.3",
49
+ "pylint==4.1.4",
50
50
  "pytest==9.2.0",
51
51
  "pytest-cov==7.1.0",
52
- "ruff==0.17.5",
52
+ "ruff==0.17.6",
53
53
  "types-deprecated>=1.2.15.20241117,<2",
54
54
  "types-requests>=2.31",
55
55
  ]
File without changes
File without changes
File without changes