PyViCare 2.64.0__tar.gz → 2.65.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.
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PKG-INFO +2 -1
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareCachedServiceBase.py +9 -2
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareDevice.py +30 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareElectricalEnergySystem.py +67 -1
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareHeatPump.py +87 -2
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareHeatingDevice.py +73 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareVentilationDevice.py +28 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareWaterTreatment.py +8 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/pyproject.toml +4 -3
- {pyvicare-2.64.0 → pyvicare-2.65.0}/.gitignore +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/LICENSE +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/Feature.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCare.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareAbstractOAuthManager.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareBrowserOAuthManager.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareCachedService.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareCachedServiceViaGateway.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareDeviceConfig.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareFloorHeating.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareFuelCell.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareGateway.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareGazBoiler.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareHeatCurveCalculation.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareHybrid.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareOAuthManager.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareOilBoiler.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCarePelletsBoiler.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareRadiatorActuator.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareRepeater.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareRoomControl.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareRoomSensor.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareService.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareServiceViaGateway.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/PyViCareUtils.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/PyViCare/__init__.py +0 -0
- {pyvicare-2.64.0 → pyvicare-2.65.0}/README.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: PyViCare
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.65.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
|
|
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
25
26
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
27
|
Requires-Python: >=3.11
|
|
27
28
|
Requires-Dist: authlib>1.2.0
|
|
@@ -30,6 +30,11 @@ class ViCareCachedServiceBase(ViCareService):
|
|
|
30
30
|
self._cacheTime: datetime | None = None
|
|
31
31
|
self._cacheError: Exception | None = None
|
|
32
32
|
self._cacheLock = threading.Lock()
|
|
33
|
+
self._lastFetchTime: datetime | None = None
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def cache_time(self):
|
|
37
|
+
return self._cacheTime
|
|
33
38
|
|
|
34
39
|
def getProperty(self, accessor: ViCareDeviceAccessor, property_name: str) -> Any:
|
|
35
40
|
data = self._get_or_update_cache(accessor)
|
|
@@ -53,7 +58,7 @@ class ViCareCachedServiceBase(ViCareService):
|
|
|
53
58
|
# to avoid consuming all the api calls if the api is down
|
|
54
59
|
# see https://github.com/home-assistant/core/issues/67052
|
|
55
60
|
# we simply return the old cache in this case
|
|
56
|
-
self.
|
|
61
|
+
self._lastFetchTime = ViCareTimer().now()
|
|
57
62
|
self._cacheError = None
|
|
58
63
|
|
|
59
64
|
try:
|
|
@@ -78,6 +83,7 @@ class ViCareCachedServiceBase(ViCareService):
|
|
|
78
83
|
raise
|
|
79
84
|
|
|
80
85
|
self._cache = data
|
|
86
|
+
self._cacheTime = self._lastFetchTime
|
|
81
87
|
elif self._cache is None and self._cacheError is not None:
|
|
82
88
|
# The fetch that opened this window failed and left nothing to
|
|
83
89
|
# read. Replaying its error keeps every other reader from
|
|
@@ -87,13 +93,14 @@ class ViCareCachedServiceBase(ViCareService):
|
|
|
87
93
|
return self._cache
|
|
88
94
|
|
|
89
95
|
def is_cache_invalid(self) -> bool:
|
|
90
|
-
return self.
|
|
96
|
+
return self._lastFetchTime is None or (ViCareTimer().now() - self._lastFetchTime).seconds > self._cacheDuration
|
|
91
97
|
|
|
92
98
|
def clear_cache(self):
|
|
93
99
|
with self._cacheLock:
|
|
94
100
|
self._cache = None
|
|
95
101
|
self._cacheTime = None
|
|
96
102
|
self._cacheError = None
|
|
103
|
+
self._lastFetchTime = None
|
|
97
104
|
|
|
98
105
|
def _fetch_uncached(self, accessor: ViCareDeviceAccessor) -> Any:
|
|
99
106
|
raise NotImplementedError
|
|
@@ -34,6 +34,36 @@ class Device:
|
|
|
34
34
|
def getDeviceErrors(self) -> list[Any]:
|
|
35
35
|
return list[Any](self.getProperty("device.messages.errors.raw")["properties"]["entries"]["value"])
|
|
36
36
|
|
|
37
|
+
# Power consumption limitation (§14a EnWG):
|
|
38
|
+
@handleNotSupported
|
|
39
|
+
def getPowerConsumptionLimit(self) -> int:
|
|
40
|
+
return int(self.getProperty("device.power.statusReport.consumption")["properties"]["limit"]["value"])
|
|
41
|
+
|
|
42
|
+
@handleNotSupported
|
|
43
|
+
def getPowerConsumptionLimitUnit(self) -> str:
|
|
44
|
+
return str(self.getProperty("device.power.statusReport.consumption")["properties"]["limit"]["unit"])
|
|
45
|
+
|
|
46
|
+
@handleNotSupported
|
|
47
|
+
def getPowerConsumptionLimitStatus(self) -> str:
|
|
48
|
+
return str(self.getProperty("device.power.statusReport.consumption")["properties"]["status"]["value"])
|
|
49
|
+
|
|
50
|
+
@handleNotSupported
|
|
51
|
+
def getPowerConsumptionLimitationSource(self) -> str:
|
|
52
|
+
return str(self.getProperty("device.power.consumption.limitation")["properties"]["value"]["value"])
|
|
53
|
+
|
|
54
|
+
# Power production limitation (feed-in):
|
|
55
|
+
@handleNotSupported
|
|
56
|
+
def getPowerProductionLimit(self) -> int:
|
|
57
|
+
return int(self.getProperty("device.power.statusReport.production")["properties"]["limit"]["value"])
|
|
58
|
+
|
|
59
|
+
@handleNotSupported
|
|
60
|
+
def getPowerProductionLimitUnit(self) -> str:
|
|
61
|
+
return str(self.getProperty("device.power.statusReport.production")["properties"]["limit"]["unit"])
|
|
62
|
+
|
|
63
|
+
@handleNotSupported
|
|
64
|
+
def getPowerProductionLimitStatus(self) -> str:
|
|
65
|
+
return str(self.getProperty("device.power.statusReport.production")["properties"]["status"]["value"])
|
|
66
|
+
|
|
37
67
|
def isLegacyDevice(self) -> bool:
|
|
38
68
|
return hasRoles(["type:legacy"], self.roles)
|
|
39
69
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from PyViCare.PyViCareDevice import Device
|
|
2
|
-
from PyViCare.PyViCareUtils import handleNotSupported
|
|
2
|
+
from PyViCare.PyViCareUtils import handleAPICommandErrors, handleNotSupported
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class ElectricalEnergySystem(Device):
|
|
@@ -52,6 +52,54 @@ class ElectricalEnergySystem(Device):
|
|
|
52
52
|
"value"
|
|
53
53
|
]
|
|
54
54
|
|
|
55
|
+
@handleNotSupported
|
|
56
|
+
def getPhotovoltaicInstalledPeakPower(self):
|
|
57
|
+
return self.getProperty("photovoltaic.installedPeakPower")["properties"][
|
|
58
|
+
"value"
|
|
59
|
+
]["value"]
|
|
60
|
+
|
|
61
|
+
@handleNotSupported
|
|
62
|
+
def getPhotovoltaicInstalledPeakPowerUnit(self):
|
|
63
|
+
return self.getProperty("photovoltaic.installedPeakPower")["properties"][
|
|
64
|
+
"value"
|
|
65
|
+
]["unit"]
|
|
66
|
+
|
|
67
|
+
@handleNotSupported
|
|
68
|
+
def getPhotovoltaicStrings(self):
|
|
69
|
+
return self.getProperty("photovoltaic.string")["properties"]["enabled"][
|
|
70
|
+
"value"
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
@handleNotSupported
|
|
74
|
+
def getPhotovoltaicStringName(self, string):
|
|
75
|
+
return self.getProperty(f"photovoltaic.string.{string}")["properties"][
|
|
76
|
+
"name"
|
|
77
|
+
]["value"]
|
|
78
|
+
|
|
79
|
+
@handleNotSupported
|
|
80
|
+
def getPhotovoltaicStringPower(self, string):
|
|
81
|
+
return self.getProperty(f"photovoltaic.string.{string}.power")["properties"][
|
|
82
|
+
"value"
|
|
83
|
+
]["value"]
|
|
84
|
+
|
|
85
|
+
@handleNotSupported
|
|
86
|
+
def getPhotovoltaicStringPowerUnit(self, string):
|
|
87
|
+
return self.getProperty(f"photovoltaic.string.{string}.power")["properties"][
|
|
88
|
+
"value"
|
|
89
|
+
]["unit"]
|
|
90
|
+
|
|
91
|
+
@handleNotSupported
|
|
92
|
+
def getPhotovoltaicStringVoltage(self, string):
|
|
93
|
+
return self.getProperty(f"photovoltaic.string.{string}.voltage")["properties"][
|
|
94
|
+
"value"
|
|
95
|
+
]["value"]
|
|
96
|
+
|
|
97
|
+
@handleNotSupported
|
|
98
|
+
def getPhotovoltaicStringCurrent(self, string):
|
|
99
|
+
return self.getProperty(f"photovoltaic.string.{string}.electricity")[
|
|
100
|
+
"properties"
|
|
101
|
+
]["value"]["value"]
|
|
102
|
+
|
|
55
103
|
@handleNotSupported
|
|
56
104
|
def getPhotovoltaicProductionCurrent(self):
|
|
57
105
|
return self.getProperty("photovoltaic.production.current")[
|
|
@@ -185,3 +233,21 @@ class ElectricalEnergySystem(Device):
|
|
|
185
233
|
return self.getProperty("ess.operationState")["properties"]["value"][
|
|
186
234
|
"value"
|
|
187
235
|
]
|
|
236
|
+
|
|
237
|
+
@handleNotSupported
|
|
238
|
+
def getElectricalEnergySystemBatteryControlMode(self):
|
|
239
|
+
return self.getProperty("ess.battery.control.mode.active")["properties"][
|
|
240
|
+
"value"
|
|
241
|
+
]["value"]
|
|
242
|
+
|
|
243
|
+
@handleNotSupported
|
|
244
|
+
def getElectricalEnergySystemBatteryControlModes(self):
|
|
245
|
+
return self.getProperty("ess.battery.control.mode.active")["commands"][
|
|
246
|
+
"setMode"
|
|
247
|
+
]["params"]["value"]["constraints"]["enum"]
|
|
248
|
+
|
|
249
|
+
@handleAPICommandErrors
|
|
250
|
+
def setElectricalEnergySystemBatteryControlMode(self, mode: str):
|
|
251
|
+
return self.setProperty(
|
|
252
|
+
"ess.battery.control.mode.active", "setMode", {"value": mode}
|
|
253
|
+
)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
# pylint: disable=too-many-lines
|
|
1
2
|
from __future__ import annotations
|
|
2
3
|
|
|
3
4
|
from contextlib import suppress
|
|
5
|
+
from itertools import count
|
|
4
6
|
from typing import Any
|
|
5
7
|
|
|
6
8
|
from deprecated import deprecated
|
|
@@ -48,6 +50,26 @@ class HeatPump(HeatingDevice, VentilationDevice):
|
|
|
48
50
|
def getInverter(self, inverter) -> Inverter:
|
|
49
51
|
return Inverter(self, inverter)
|
|
50
52
|
|
|
53
|
+
@property
|
|
54
|
+
def fans(self) -> list[Fan]:
|
|
55
|
+
return [self.getFan(x) for x in self.getAvailableFans()]
|
|
56
|
+
|
|
57
|
+
def getFan(self, fan: str) -> Fan:
|
|
58
|
+
return Fan(self, fan)
|
|
59
|
+
|
|
60
|
+
@handleNotSupported
|
|
61
|
+
def getAvailableFans(self) -> list[str]:
|
|
62
|
+
fan_count = 0
|
|
63
|
+
for fan in count():
|
|
64
|
+
try:
|
|
65
|
+
self.getProperty(f"heating.primaryCircuit.fans.{fan}.current")
|
|
66
|
+
fan_count += 1
|
|
67
|
+
except PyViCareNotSupportedFeatureError:
|
|
68
|
+
break
|
|
69
|
+
if fan_count == 0:
|
|
70
|
+
raise PyViCareNotSupportedFeatureError("heating.primaryCircuit.fans.0.current")
|
|
71
|
+
return [str(x) for x in range(fan_count)]
|
|
72
|
+
|
|
51
73
|
@handleNotSupported
|
|
52
74
|
def getBufferMainTemperature(self):
|
|
53
75
|
return self.getProperty("heating.bufferCylinder.sensors.temperature.main")["properties"]["value"]["value"]
|
|
@@ -182,6 +204,51 @@ class HeatPump(HeatingDevice, VentilationDevice):
|
|
|
182
204
|
def getPowerSummaryConsumptionDomesticHotWaterLastYear(self):
|
|
183
205
|
return self.getProperty("heating.power.consumption.summary.dhw")["properties"]["lastYear"]["value"]
|
|
184
206
|
|
|
207
|
+
# Current values of the whole heat pump, Compressor has the per-compressor ones:
|
|
208
|
+
@handleNotSupported
|
|
209
|
+
def getHeatProductionCurrent(self) -> float:
|
|
210
|
+
return float(self.getProperty("heating.heat.production.current")["properties"]["value"]["value"])
|
|
211
|
+
|
|
212
|
+
@handleNotSupported
|
|
213
|
+
def getHeatProductionCurrentUnit(self) -> str:
|
|
214
|
+
return str(self.getProperty("heating.heat.production.current")["properties"]["value"]["unit"])
|
|
215
|
+
|
|
216
|
+
@handleNotSupported
|
|
217
|
+
def getPowerConsumptionCurrent(self) -> float:
|
|
218
|
+
return float(self.getProperty("heating.power.consumption.current")["properties"]["value"]["value"])
|
|
219
|
+
|
|
220
|
+
@handleNotSupported
|
|
221
|
+
def getPowerConsumptionCurrentUnit(self) -> str:
|
|
222
|
+
return str(self.getProperty("heating.power.consumption.current")["properties"]["value"]["unit"])
|
|
223
|
+
|
|
224
|
+
@handleNotSupported
|
|
225
|
+
def getDefrostingActive(self) -> bool:
|
|
226
|
+
return bool(self.getProperty("heating.outdoor.defrosting")["properties"]["active"]["value"])
|
|
227
|
+
|
|
228
|
+
@handleNotSupported
|
|
229
|
+
def getFourThreeWayValvePosition(self) -> str:
|
|
230
|
+
return str(self.getProperty("heating.valves.fourThreeWay.position")["properties"]["value"]["value"])
|
|
231
|
+
|
|
232
|
+
@handleNotSupported
|
|
233
|
+
def getSecondaryCircuitOperationState(self) -> str:
|
|
234
|
+
return str(self.getProperty("heating.secondaryCircuit.operation.state")["properties"]["currentValue"]["value"])
|
|
235
|
+
|
|
236
|
+
@handleNotSupported
|
|
237
|
+
def getSecondaryCircuitOperationStateTarget(self) -> str:
|
|
238
|
+
return str(self.getProperty("heating.secondaryCircuit.operation.state")["properties"]["targetValue"]["value"])
|
|
239
|
+
|
|
240
|
+
@handleNotSupported
|
|
241
|
+
def getSecondaryCircuitFourThreeWayValvePosition(self) -> int:
|
|
242
|
+
return int(self.getProperty("heating.secondaryCircuit.valves.fourThreeWay")["properties"]["current"]["value"])
|
|
243
|
+
|
|
244
|
+
@handleNotSupported
|
|
245
|
+
def getSecondaryCircuitFourThreeWayValvePositionTarget(self) -> int:
|
|
246
|
+
return int(self.getProperty("heating.secondaryCircuit.valves.fourThreeWay")["properties"]["target"]["value"])
|
|
247
|
+
|
|
248
|
+
@handleNotSupported
|
|
249
|
+
def getSecondaryCircuitFourThreeWayValvePositionUnit(self) -> str:
|
|
250
|
+
return str(self.getProperty("heating.secondaryCircuit.valves.fourThreeWay")["properties"]["current"]["unit"])
|
|
251
|
+
|
|
185
252
|
@handleNotSupported
|
|
186
253
|
def getVolumetricFlowReturn(self):
|
|
187
254
|
return self.getProperty("heating.sensors.volumetricFlow.allengra")["properties"]['value']['value']
|
|
@@ -651,8 +718,12 @@ class Compressor(HeatingDeviceWithComponent):
|
|
|
651
718
|
return str(self.getProperty(f"heating.compressors.{self.compressor}.sensors.power")["properties"]["value"]["unit"])
|
|
652
719
|
|
|
653
720
|
@handleNotSupported
|
|
654
|
-
def getSpeed(self) ->
|
|
655
|
-
return
|
|
721
|
+
def getSpeed(self) -> float:
|
|
722
|
+
return float(self.getProperty(f"heating.compressors.{self.compressor}.speed.current")["properties"]["value"]["value"])
|
|
723
|
+
|
|
724
|
+
@handleNotSupported
|
|
725
|
+
def getSpeedUnit(self) -> str:
|
|
726
|
+
return str(self.getProperty(f"heating.compressors.{self.compressor}.speed.current")["properties"]["value"]["unit"])
|
|
656
727
|
|
|
657
728
|
@handleNotSupported
|
|
658
729
|
def getHeatProductionCurrent(self) -> float:
|
|
@@ -807,14 +878,17 @@ class Compressor(HeatingDeviceWithComponent):
|
|
|
807
878
|
# Shows the oil temperature of the compressor.
|
|
808
879
|
return float(self.getProperty(f"heating.compressors.{self.compressor}.sensors.temperature.oil")["properties"]["value"]["value"])
|
|
809
880
|
|
|
881
|
+
@handleNotSupported
|
|
810
882
|
def getMotorChamberTemperature(self) -> float:
|
|
811
883
|
# Shows the motor chamber temperature of the compressor.
|
|
812
884
|
return float(self.getProperty(f"heating.compressors.{self.compressor}.sensors.temperature.motorChamber")["properties"]["value"]["value"])
|
|
813
885
|
|
|
886
|
+
@handleNotSupported
|
|
814
887
|
def getAmbientTemperature(self) -> float:
|
|
815
888
|
# Shows the ambient temperature of the compressor.
|
|
816
889
|
return float(self.getProperty(f"heating.compressors.{self.compressor}.sensors.temperature.ambient")["properties"]["value"]["value"])
|
|
817
890
|
|
|
891
|
+
@handleNotSupported
|
|
818
892
|
def getOverheatTemperature(self) -> float:
|
|
819
893
|
# Shows the overheat temperature of the compressor.
|
|
820
894
|
return float(self.getProperty(f"heating.compressors.{self.compressor}.sensors.temperature.overheat")["properties"]["value"]["value"])
|
|
@@ -939,3 +1013,14 @@ class Inverter(HeatingDeviceWithComponent):
|
|
|
939
1013
|
@handleNotSupported
|
|
940
1014
|
def getTemperature(self) -> float:
|
|
941
1015
|
return float(self.getProperty(f"heating.inverters.{self.inverter}.sensors.temperature.powerModule")["properties"]["value"]["value"])
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
class Fan(HeatingDeviceWithComponent):
|
|
1019
|
+
|
|
1020
|
+
@property
|
|
1021
|
+
def fan(self) -> str:
|
|
1022
|
+
return self.component
|
|
1023
|
+
|
|
1024
|
+
@handleNotSupported
|
|
1025
|
+
def getSpeed(self) -> float:
|
|
1026
|
+
return float(self.getProperty(f"heating.primaryCircuit.fans.{self.fan}.current")["properties"]["value"]["value"])
|
|
@@ -370,6 +370,21 @@ class HeatingDevice(Device):
|
|
|
370
370
|
return self.getProperty("heating.dhw.pumps.circulation.schedule")["commands"]["setSchedule"]["params"][
|
|
371
371
|
"newSchedule"]["constraints"]["modes"]
|
|
372
372
|
|
|
373
|
+
@handleNotSupported
|
|
374
|
+
def getDomesticHotWaterCirculationScheduleMaxEntries(self) -> int:
|
|
375
|
+
return int(self.getProperty("heating.dhw.pumps.circulation.schedule")["commands"]["setSchedule"]["params"][
|
|
376
|
+
"newSchedule"]["constraints"]["maxEntries"])
|
|
377
|
+
|
|
378
|
+
@handleNotSupported
|
|
379
|
+
def getDomesticHotWaterCirculationScheduleOverlapAllowed(self) -> bool:
|
|
380
|
+
return bool(self.getProperty("heating.dhw.pumps.circulation.schedule")["commands"]["setSchedule"]["params"][
|
|
381
|
+
"newSchedule"]["constraints"]["overlapAllowed"])
|
|
382
|
+
|
|
383
|
+
@handleNotSupported
|
|
384
|
+
def getDomesticHotWaterCirculationScheduleResolution(self) -> int:
|
|
385
|
+
return int(self.getProperty("heating.dhw.pumps.circulation.schedule")["commands"]["setSchedule"]["params"][
|
|
386
|
+
"newSchedule"]["constraints"]["resolution"])
|
|
387
|
+
|
|
373
388
|
@handleNotSupported
|
|
374
389
|
def getDomesticHotWaterCirculationSchedule(self):
|
|
375
390
|
schedule = self.getProperty(
|
|
@@ -461,6 +476,64 @@ class HeatingDevice(Device):
|
|
|
461
476
|
def getBoilerTemperature(self):
|
|
462
477
|
return self.getProperty("heating.boiler.sensors.temperature.main")["properties"]["value"]["value"]
|
|
463
478
|
|
|
479
|
+
# Heat production summary for Heating:
|
|
480
|
+
@handleNotSupported
|
|
481
|
+
def getHeatProductionSummaryHeatingUnit(self) -> str:
|
|
482
|
+
return str(self.getProperty("heating.heat.production.summary.heating")["properties"]["currentDay"]["unit"])
|
|
483
|
+
|
|
484
|
+
@handleNotSupported
|
|
485
|
+
def getHeatProductionSummaryHeatingCurrentDay(self) -> float:
|
|
486
|
+
return float(self.getProperty("heating.heat.production.summary.heating")["properties"]["currentDay"]["value"])
|
|
487
|
+
|
|
488
|
+
@handleNotSupported
|
|
489
|
+
def getHeatProductionSummaryHeatingCurrentMonth(self) -> float:
|
|
490
|
+
return float(self.getProperty("heating.heat.production.summary.heating")["properties"]["currentMonth"]["value"])
|
|
491
|
+
|
|
492
|
+
@handleNotSupported
|
|
493
|
+
def getHeatProductionSummaryHeatingCurrentYear(self) -> float:
|
|
494
|
+
return float(self.getProperty("heating.heat.production.summary.heating")["properties"]["currentYear"]["value"])
|
|
495
|
+
|
|
496
|
+
@handleNotSupported
|
|
497
|
+
def getHeatProductionSummaryHeatingLastMonth(self) -> float:
|
|
498
|
+
return float(self.getProperty("heating.heat.production.summary.heating")["properties"]["lastMonth"]["value"])
|
|
499
|
+
|
|
500
|
+
@handleNotSupported
|
|
501
|
+
def getHeatProductionSummaryHeatingLastSevenDays(self) -> float:
|
|
502
|
+
return float(self.getProperty("heating.heat.production.summary.heating")["properties"]["lastSevenDays"]["value"])
|
|
503
|
+
|
|
504
|
+
@handleNotSupported
|
|
505
|
+
def getHeatProductionSummaryHeatingLastYear(self) -> float:
|
|
506
|
+
return float(self.getProperty("heating.heat.production.summary.heating")["properties"]["lastYear"]["value"])
|
|
507
|
+
|
|
508
|
+
# Heat production summary for Domestic Hot Water:
|
|
509
|
+
@handleNotSupported
|
|
510
|
+
def getHeatProductionSummaryDomesticHotWaterUnit(self) -> str:
|
|
511
|
+
return str(self.getProperty("heating.heat.production.summary.dhw")["properties"]["currentDay"]["unit"])
|
|
512
|
+
|
|
513
|
+
@handleNotSupported
|
|
514
|
+
def getHeatProductionSummaryDomesticHotWaterCurrentDay(self) -> float:
|
|
515
|
+
return float(self.getProperty("heating.heat.production.summary.dhw")["properties"]["currentDay"]["value"])
|
|
516
|
+
|
|
517
|
+
@handleNotSupported
|
|
518
|
+
def getHeatProductionSummaryDomesticHotWaterCurrentMonth(self) -> float:
|
|
519
|
+
return float(self.getProperty("heating.heat.production.summary.dhw")["properties"]["currentMonth"]["value"])
|
|
520
|
+
|
|
521
|
+
@handleNotSupported
|
|
522
|
+
def getHeatProductionSummaryDomesticHotWaterCurrentYear(self) -> float:
|
|
523
|
+
return float(self.getProperty("heating.heat.production.summary.dhw")["properties"]["currentYear"]["value"])
|
|
524
|
+
|
|
525
|
+
@handleNotSupported
|
|
526
|
+
def getHeatProductionSummaryDomesticHotWaterLastMonth(self) -> float:
|
|
527
|
+
return float(self.getProperty("heating.heat.production.summary.dhw")["properties"]["lastMonth"]["value"])
|
|
528
|
+
|
|
529
|
+
@handleNotSupported
|
|
530
|
+
def getHeatProductionSummaryDomesticHotWaterLastSevenDays(self) -> float:
|
|
531
|
+
return float(self.getProperty("heating.heat.production.summary.dhw")["properties"]["lastSevenDays"]["value"])
|
|
532
|
+
|
|
533
|
+
@handleNotSupported
|
|
534
|
+
def getHeatProductionSummaryDomesticHotWaterLastYear(self) -> float:
|
|
535
|
+
return float(self.getProperty("heating.heat.production.summary.dhw")["properties"]["lastYear"]["value"])
|
|
536
|
+
|
|
464
537
|
|
|
465
538
|
class HeatingDeviceWithComponent:
|
|
466
539
|
"""This is the base class for all heating components"""
|
|
@@ -336,6 +336,34 @@ class VentilationDevice(Device):
|
|
|
336
336
|
def getHeatRecoveryEfficiency(self) -> float:
|
|
337
337
|
return float(self.getProperty("ventilation.heating.recovery")["properties"]["value"]["value"])
|
|
338
338
|
|
|
339
|
+
@handleNotSupported
|
|
340
|
+
def getBypassActive(self) -> bool:
|
|
341
|
+
return bool(self.getProperty("ventilation.bypass")["properties"]["active"]["value"])
|
|
342
|
+
|
|
343
|
+
@handleNotSupported
|
|
344
|
+
def getBypassPosition(self) -> int:
|
|
345
|
+
return int(self.getProperty("ventilation.bypass.position")["properties"]["value"]["value"])
|
|
346
|
+
|
|
347
|
+
@handleNotSupported
|
|
348
|
+
def getBypassAutomaticMode(self) -> bool:
|
|
349
|
+
return bool(self.getProperty("ventilation.bypass.operating.modes.automatic")["properties"]["active"]["value"])
|
|
350
|
+
|
|
351
|
+
@handleNotSupported
|
|
352
|
+
def getBypassOpenMode(self) -> bool:
|
|
353
|
+
return bool(self.getProperty("ventilation.bypass.operating.modes.open")["properties"]["active"]["value"])
|
|
354
|
+
|
|
355
|
+
@handleNotSupported
|
|
356
|
+
def getBypassOperatingModeLevel(self) -> str:
|
|
357
|
+
return str(self.getProperty("ventilation.bypass.operating.modes.active")["properties"]["level"]["value"])
|
|
358
|
+
|
|
359
|
+
@handleNotSupported
|
|
360
|
+
def getBypassOperatingModeState(self) -> str:
|
|
361
|
+
return str(self.getProperty("ventilation.bypass.operating.modes.active")["properties"]["state"]["value"])
|
|
362
|
+
|
|
363
|
+
@handleNotSupported
|
|
364
|
+
def getBypassOperatingModeValue(self) -> str:
|
|
365
|
+
return str(self.getProperty("ventilation.bypass.operating.modes.active")["properties"]["value"]["value"])
|
|
366
|
+
|
|
339
367
|
@handleNotSupported
|
|
340
368
|
def getSupplyVolumeFlow(self) -> int:
|
|
341
369
|
return int(self.getProperty("ventilation.volumeFlow.current.input")["properties"]["value"]["value"])
|
|
@@ -38,6 +38,14 @@ class WaterTreatment(Device):
|
|
|
38
38
|
def getTotalConsumption(self) -> int:
|
|
39
39
|
return int(self.getProperty("water.consumption.summary")["properties"]["total"]["value"])
|
|
40
40
|
|
|
41
|
+
@handleNotSupported
|
|
42
|
+
def getCurrentDayConsumption(self) -> int:
|
|
43
|
+
return int(self.getProperty("water.consumption.summary")["properties"]["currentDay"]["value"])
|
|
44
|
+
|
|
45
|
+
@handleNotSupported
|
|
46
|
+
def getLastSevenDaysConsumption(self) -> int:
|
|
47
|
+
return int(self.getProperty("water.consumption.summary")["properties"]["lastSevenDays"]["value"])
|
|
48
|
+
|
|
41
49
|
# --- Leak Detection ---
|
|
42
50
|
|
|
43
51
|
@property
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "PyViCare"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.65.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"
|
|
@@ -23,6 +23,7 @@ classifiers = [
|
|
|
23
23
|
"Programming Language :: Python :: 3.12",
|
|
24
24
|
"Programming Language :: Python :: 3.13",
|
|
25
25
|
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Programming Language :: Python :: 3.15",
|
|
26
27
|
"Programming Language :: Python :: 3",
|
|
27
28
|
"License :: OSI Approved :: Apache Software License",
|
|
28
29
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
@@ -46,9 +47,9 @@ dev = [
|
|
|
46
47
|
"codespell==2.4.3",
|
|
47
48
|
"mypy==2.4.1",
|
|
48
49
|
"pylint==4.1.3",
|
|
49
|
-
"pytest==9.
|
|
50
|
+
"pytest==9.2.0",
|
|
50
51
|
"pytest-cov==7.1.0",
|
|
51
|
-
"ruff==0.17.
|
|
52
|
+
"ruff==0.17.4",
|
|
52
53
|
"types-deprecated>=1.2.15.20241117,<2",
|
|
53
54
|
"types-requests>=2.31",
|
|
54
55
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|