PyViCare 2.57.0__tar.gz → 2.58.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 (30) hide show
  1. {pyvicare-2.57.0 → pyvicare-2.58.0}/PKG-INFO +1 -1
  2. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareFuelCell.py +20 -0
  3. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareGazBoiler.py +46 -1
  4. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareHeatPump.py +260 -13
  5. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareHeatingDevice.py +18 -0
  6. {pyvicare-2.57.0 → pyvicare-2.58.0}/pyproject.toml +1 -1
  7. {pyvicare-2.57.0 → pyvicare-2.58.0}/LICENSE +0 -0
  8. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/Feature.py +0 -0
  9. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCare.py +0 -0
  10. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareAbstractOAuthManager.py +0 -0
  11. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareBrowserOAuthManager.py +0 -0
  12. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareCachedService.py +0 -0
  13. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareDevice.py +0 -0
  14. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareDeviceConfig.py +0 -0
  15. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareElectricalEnergySystem.py +0 -0
  16. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareFloorHeating.py +0 -0
  17. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareGateway.py +0 -0
  18. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareHeatCurveCalculation.py +0 -0
  19. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareHybrid.py +0 -0
  20. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareOAuthManager.py +0 -0
  21. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareOilBoiler.py +0 -0
  22. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCarePelletsBoiler.py +0 -0
  23. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareRadiatorActuator.py +0 -0
  24. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareRepeater.py +0 -0
  25. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareRoomSensor.py +0 -0
  26. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareService.py +0 -0
  27. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareUtils.py +0 -0
  28. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/PyViCareVentilationDevice.py +0 -0
  29. {pyvicare-2.57.0 → pyvicare-2.58.0}/PyViCare/__init__.py +0 -0
  30. {pyvicare-2.57.0 → pyvicare-2.58.0}/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyViCare
3
- Version: 2.57.0
3
+ Version: 2.58.0
4
4
  Summary: Library to communicate with the Viessmann ViCare API.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -23,6 +23,7 @@ class FuelCell(HeatingDevice):
23
23
  def getReturnTemperature(self):
24
24
  return self.getProperty("heating.sensors.temperature.return")["properties"]["value"]["value"]
25
25
 
26
+ # Total power consumption:
26
27
  @handleNotSupported
27
28
  def getPowerConsumptionUnit(self):
28
29
  return self.getProperty("heating.power.consumption.total")["properties"]["day"]["unit"]
@@ -59,6 +60,7 @@ class FuelCell(HeatingDevice):
59
60
  def getPowerConsumptionThisYear(self):
60
61
  return self.getProperty('heating.power.consumption.total')['properties']['year']['value'][0]
61
62
 
63
+ # Power consumption for Heating:
62
64
  @handleNotSupported
63
65
  def getPowerConsumptionHeatingUnit(self):
64
66
  return self.getProperty("heating.power.consumption.heating")["properties"]["day"]["unit"]
@@ -95,6 +97,24 @@ class FuelCell(HeatingDevice):
95
97
  def getPowerConsumptionHeatingThisYear(self):
96
98
  return self.getProperty('heating.power.consumption.heating')['properties']['year']['value'][0]
97
99
 
100
+ # Power consumption for Domestic Hot Water:
101
+ @handleNotSupported
102
+ def getPowerConsumptionDomesticHotWaterUnit(self):
103
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["day"]["unit"]
104
+
105
+ @handleNotSupported
106
+ def getPowerConsumptionDomesticHotWaterToday(self):
107
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["day"]["value"][0]
108
+
109
+ @handleNotSupported
110
+ def getPowerConsumptionDomesticHotWaterThisMonth(self):
111
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["month"]["value"][0]
112
+
113
+ @handleNotSupported
114
+ def getPowerConsumptionDomesticHotWaterThisYear(self):
115
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["year"]["value"][0]
116
+
117
+ # Gas consumption:
98
118
  @handleNotSupported
99
119
  def getGasConsumptionUnit(self):
100
120
  return self.getProperty("heating.gas.consumption.total")["properties"]["day"]["unit"]
@@ -103,9 +103,13 @@ class GazBoiler(HeatingDevice):
103
103
  def getDomesticHotWaterChargingLevel(self):
104
104
  return self.getProperty("heating.dhw.charging.level")["properties"]["value"]["value"]
105
105
 
106
+ # Total power consumption:
106
107
  @handleNotSupported
107
108
  def getPowerConsumptionUnit(self):
108
- return self.getProperty("heating.power.consumption.total")["properties"]["day"]["unit"]
109
+ try :
110
+ return self.getProperty("heating.power.consumption.total")["properties"]["day"]["unit"]
111
+ except KeyError:
112
+ return self.getProperty("heating.power.consumption.total")["properties"]["unit"]["value"]
109
113
 
110
114
  @handleNotSupported
111
115
  def getPowerConsumptionDays(self):
@@ -139,6 +143,7 @@ class GazBoiler(HeatingDevice):
139
143
  def getPowerConsumptionThisYear(self):
140
144
  return self.getProperty("heating.power.consumption.total")["properties"]["year"]["value"][0]
141
145
 
146
+ # Flow
142
147
  @handleNotSupported
143
148
  def getVolumetricFlowReturn(self):
144
149
  return self.getProperty("heating.sensors.volumetricFlow.allengra")["properties"]["value"]["value"]
@@ -204,6 +209,26 @@ class GazBoiler(HeatingDevice):
204
209
 
205
210
  # Power consumption for Heating:
206
211
  @handleNotSupported
212
+ def getPowerConsumptionHeatingUnit(self):
213
+ try:
214
+ return self.getProperty("heating.power.consumption.heating")["properties"]["day"]["unit"]
215
+ except KeyError:
216
+ return self.getProperty("heating.power.consumption.heating")["properties"]["unit"]["value"]
217
+
218
+ @handleNotSupported
219
+ def getPowerConsumptionHeatingToday(self):
220
+ return self.getProperty("heating.power.consumption.heating")["properties"]["day"]["value"][0]
221
+
222
+ @handleNotSupported
223
+ def getPowerConsumptionHeatingThisMonth(self):
224
+ return self.getProperty("heating.power.consumption.heating")["properties"]["month"]["value"][0]
225
+
226
+ @handleNotSupported
227
+ def getPowerConsumptionHeatingThisYear(self):
228
+ return self.getProperty("heating.power.consumption.heating")["properties"]["year"]["value"][0]
229
+
230
+ # Power summary consumption for Heating:
231
+ @handleNotSupported
207
232
  def getPowerSummaryConsumptionHeatingUnit(self):
208
233
  return self.getProperty("heating.power.consumption.summary.heating")["properties"]["currentDay"]["unit"]
209
234
 
@@ -233,6 +258,26 @@ class GazBoiler(HeatingDevice):
233
258
 
234
259
  # Power consumption for Domestic Hot Water:
235
260
  @handleNotSupported
261
+ def getPowerConsumptionDomesticHotWaterUnit(self):
262
+ try:
263
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["day"]["unit"]
264
+ except KeyError:
265
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["unit"]["value"]
266
+
267
+ @handleNotSupported
268
+ def getPowerConsumptionDomesticHotWaterToday(self):
269
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["day"]["value"][0]
270
+
271
+ @handleNotSupported
272
+ def getPowerConsumptionDomesticHotWaterThisMonth(self):
273
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["month"]["value"][0]
274
+
275
+ @handleNotSupported
276
+ def getPowerConsumptionDomesticHotWaterThisYear(self):
277
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["year"]["value"][0]
278
+
279
+ # Power summary consumption for Domestic Hot Water:
280
+ @handleNotSupported
236
281
  def getPowerSummaryConsumptionDomesticHotWaterUnit(self):
237
282
  return self.getProperty("heating.power.consumption.summary.dhw")["properties"]["currentDay"]["unit"]
238
283
 
@@ -45,14 +45,31 @@ class HeatPump(HeatingDevice, VentilationDevice):
45
45
 
46
46
  @handleNotSupported
47
47
  def getBufferMainTemperature(self):
48
- return self.getProperty("heating.bufferCylinder.sensors.temperature.main")["properties"]['value']['value']
48
+ return self.getProperty("heating.bufferCylinder.sensors.temperature.main")["properties"]["value"]["value"]
49
49
 
50
50
  @handleNotSupported
51
51
  def getBufferTopTemperature(self):
52
- return self.getProperty("heating.bufferCylinder.sensors.temperature.top")["properties"]['value']['value']
52
+ return self.getProperty("heating.bufferCylinder.sensors.temperature.top")["properties"]["value"]["value"]
53
53
 
54
54
  # Power consumption for Heating:
55
55
  @handleNotSupported
56
+ def getPowerConsumptionHeatingUnit(self):
57
+ return self.getProperty("heating.power.consumption.heating")["properties"]["day"]["unit"]
58
+
59
+ @handleNotSupported
60
+ def getPowerConsumptionHeatingToday(self):
61
+ return self.getProperty("heating.power.consumption.heating")["properties"]["day"]["value"][0]
62
+
63
+ @handleNotSupported
64
+ def getPowerConsumptionHeatingThisMonth(self):
65
+ return self.getProperty("heating.power.consumption.heating")["properties"]["month"]["value"][0]
66
+
67
+ @handleNotSupported
68
+ def getPowerConsumptionHeatingThisYear(self):
69
+ return self.getProperty("heating.power.consumption.heating")["properties"]["year"]["value"][0]
70
+
71
+ # Power summary consumption for Heating:
72
+ @handleNotSupported
56
73
  def getPowerSummaryConsumptionHeatingUnit(self):
57
74
  return self.getProperty("heating.power.consumption.summary.heating")["properties"]["currentDay"]["unit"]
58
75
 
@@ -97,6 +114,7 @@ class HeatPump(HeatingDevice, VentilationDevice):
97
114
  def getPowerConsumptionCoolingThisYear(self):
98
115
  return self.getProperty("heating.power.consumption.cooling")["properties"]["year"]["value"][0]
99
116
 
117
+ # Total power consumption:
100
118
  @handleNotSupported
101
119
  def getPowerConsumptionUnit(self):
102
120
  return self.getProperty("heating.power.consumption.total")["properties"]["day"]["unit"]
@@ -105,11 +123,32 @@ class HeatPump(HeatingDevice, VentilationDevice):
105
123
  def getPowerConsumptionToday(self):
106
124
  return self.getProperty("heating.power.consumption.total")["properties"]["day"]["value"][0]
107
125
 
126
+ @handleNotSupported
127
+ def getPowerConsumptionThisMonth(self):
128
+ return self.getProperty("heating.power.consumption.total")["properties"]["month"]["value"][0]
129
+
130
+ @handleNotSupported
131
+ def getPowerConsumptionThisYear(self):
132
+ return self.getProperty("heating.power.consumption.total")["properties"]["year"]["value"][0]
133
+
134
+ # Power consumption for Domestic Hot Water:
135
+ @handleNotSupported
136
+ def getPowerConsumptionDomesticHotWaterUnit(self):
137
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["day"]["unit"]
138
+
108
139
  @handleNotSupported
109
140
  def getPowerConsumptionDomesticHotWaterToday(self):
110
141
  return self.getProperty("heating.power.consumption.dhw")["properties"]["day"]["value"][0]
111
142
 
112
- # Power consumption for Domestic Hot Water:
143
+ @handleNotSupported
144
+ def getPowerConsumptionDomesticHotWaterThisMonth(self):
145
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["month"]["value"][0]
146
+
147
+ @handleNotSupported
148
+ def getPowerConsumptionDomesticHotWaterThisYear(self):
149
+ return self.getProperty("heating.power.consumption.dhw")["properties"]["year"]["value"][0]
150
+
151
+ # Power summary consumption for Domestic Hot Water:
113
152
  @handleNotSupported
114
153
  def getPowerSummaryConsumptionDomesticHotWaterUnit(self):
115
154
  return self.getProperty("heating.power.consumption.summary.dhw")["properties"]["currentDay"]["unit"]
@@ -286,6 +325,24 @@ class HeatPump(HeatingDevice, VentilationDevice):
286
325
  def getSeasonalPerformanceFactorTotal(self) -> float:
287
326
  return float(self.getProperty("heating.spf.total")["properties"]["value"]["value"])
288
327
 
328
+ # COP (Coefficient of Performance) - instantaneous efficiency metrics
329
+ # Some devices expose COP instead of SPF
330
+ @handleNotSupported
331
+ def getCoefficientOfPerformanceHeating(self) -> float:
332
+ return float(self.getProperty("heating.cop.heating")["properties"]["value"]["value"])
333
+
334
+ @handleNotSupported
335
+ def getCoefficientOfPerformanceDHW(self) -> float:
336
+ return float(self.getProperty("heating.cop.dhw")["properties"]["value"]["value"])
337
+
338
+ @handleNotSupported
339
+ def getCoefficientOfPerformanceTotal(self) -> float:
340
+ return float(self.getProperty("heating.cop.total")["properties"]["value"]["value"])
341
+
342
+ @handleNotSupported
343
+ def getCoefficientOfPerformanceCooling(self) -> float:
344
+ return float(self.getProperty("heating.cop.cooling")["properties"]["value"]["value"])
345
+
289
346
  @handleNotSupported
290
347
  def getHeatingRodStarts(self) -> int:
291
348
  return int(self.getProperty("heating.heatingRod.statistics")["properties"]["starts"]["value"])
@@ -322,6 +379,157 @@ class HeatPump(HeatingDevice, VentilationDevice):
322
379
  def getHeatingRodPowerConsumptionTotalThisYear(self) -> float:
323
380
  return float(self.getProperty("heating.heatingRod.power.consumption.total")["properties"]["year"]["value"][0])
324
381
 
382
+ # Heating rod power consumption summary for DHW:
383
+ @handleNotSupported
384
+ def getHeatingRodPowerConsumptionSummaryDHWUnit(self) -> str:
385
+ return str(self.getProperty("heating.heatingRod.power.consumption.summary.dhw")["properties"]["currentDay"]["unit"])
386
+
387
+ @handleNotSupported
388
+ def getHeatingRodPowerConsumptionSummaryDHWCurrentDay(self) -> float:
389
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.dhw")["properties"]["currentDay"]["value"])
390
+
391
+ @handleNotSupported
392
+ def getHeatingRodPowerConsumptionSummaryDHWCurrentMonth(self) -> float:
393
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.dhw")["properties"]["currentMonth"]["value"])
394
+
395
+ @handleNotSupported
396
+ def getHeatingRodPowerConsumptionSummaryDHWCurrentYear(self) -> float:
397
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.dhw")["properties"]["currentYear"]["value"])
398
+
399
+ @handleNotSupported
400
+ def getHeatingRodPowerConsumptionSummaryDHWLastMonth(self) -> float:
401
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.dhw")["properties"]["lastMonth"]["value"])
402
+
403
+ @handleNotSupported
404
+ def getHeatingRodPowerConsumptionSummaryDHWLastSevenDays(self) -> float:
405
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.dhw")["properties"]["lastSevenDays"]["value"])
406
+
407
+ @handleNotSupported
408
+ def getHeatingRodPowerConsumptionSummaryDHWLastYear(self) -> float:
409
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.dhw")["properties"]["lastYear"]["value"])
410
+
411
+ # Heating rod power consumption summary for Heating:
412
+ @handleNotSupported
413
+ def getHeatingRodPowerConsumptionSummaryHeatingUnit(self) -> str:
414
+ return str(self.getProperty("heating.heatingRod.power.consumption.summary.heating")["properties"]["currentDay"]["unit"])
415
+
416
+ @handleNotSupported
417
+ def getHeatingRodPowerConsumptionSummaryHeatingCurrentDay(self) -> float:
418
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.heating")["properties"]["currentDay"]["value"])
419
+
420
+ @handleNotSupported
421
+ def getHeatingRodPowerConsumptionSummaryHeatingCurrentMonth(self) -> float:
422
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.heating")["properties"]["currentMonth"]["value"])
423
+
424
+ @handleNotSupported
425
+ def getHeatingRodPowerConsumptionSummaryHeatingCurrentYear(self) -> float:
426
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.heating")["properties"]["currentYear"]["value"])
427
+
428
+ @handleNotSupported
429
+ def getHeatingRodPowerConsumptionSummaryHeatingLastMonth(self) -> float:
430
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.heating")["properties"]["lastMonth"]["value"])
431
+
432
+ @handleNotSupported
433
+ def getHeatingRodPowerConsumptionSummaryHeatingLastSevenDays(self) -> float:
434
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.heating")["properties"]["lastSevenDays"]["value"])
435
+
436
+ @handleNotSupported
437
+ def getHeatingRodPowerConsumptionSummaryHeatingLastYear(self) -> float:
438
+ return float(self.getProperty("heating.heatingRod.power.consumption.summary.heating")["properties"]["lastYear"]["value"])
439
+
440
+ # Heating rod runtime by level
441
+ @handleNotSupported
442
+ def getHeatingRodRuntimeLevelOne(self) -> int:
443
+ return int(self.getProperty("heating.heatingRod.runtime")["properties"]["levelOne"]["value"])
444
+
445
+ @handleNotSupported
446
+ def getHeatingRodRuntimeLevelTwo(self) -> int:
447
+ return int(self.getProperty("heating.heatingRod.runtime")["properties"]["levelTwo"]["value"])
448
+
449
+ @handleNotSupported
450
+ def getHeatingRodRuntimeLevelOneUnit(self) -> str:
451
+ return str(self.getProperty("heating.heatingRod.runtime")["properties"]["levelOne"]["unit"])
452
+
453
+ # Additional pressure sensors (refrigerant circuit)
454
+ @handleNotSupported
455
+ def getHotGasPressure(self) -> float:
456
+ return float(self.getProperty("heating.sensors.pressure.hotGas")["properties"]["value"]["value"])
457
+
458
+ @handleNotSupported
459
+ def getHotGasPressureUnit(self) -> str:
460
+ return str(self.getProperty("heating.sensors.pressure.hotGas")["properties"]["value"]["unit"])
461
+
462
+ @handleNotSupported
463
+ def getSuctionGasPressure(self) -> float:
464
+ return float(self.getProperty("heating.sensors.pressure.suctionGas")["properties"]["value"]["value"])
465
+
466
+ @handleNotSupported
467
+ def getSuctionGasPressureUnit(self) -> str:
468
+ return str(self.getProperty("heating.sensors.pressure.suctionGas")["properties"]["value"]["unit"])
469
+
470
+ # Additional temperature sensors (refrigerant circuit)
471
+ @handleNotSupported
472
+ def getHotGasTemperature(self) -> float:
473
+ return float(self.getProperty("heating.sensors.temperature.hotGas")["properties"]["value"]["value"])
474
+
475
+ @handleNotSupported
476
+ def getHotGasTemperatureUnit(self) -> str:
477
+ return str(self.getProperty("heating.sensors.temperature.hotGas")["properties"]["value"]["unit"])
478
+
479
+ @handleNotSupported
480
+ def getLiquidGasTemperature(self) -> float:
481
+ return float(self.getProperty("heating.sensors.temperature.liquidGas")["properties"]["value"]["value"])
482
+
483
+ @handleNotSupported
484
+ def getLiquidGasTemperatureUnit(self) -> str:
485
+ return str(self.getProperty("heating.sensors.temperature.liquidGas")["properties"]["value"]["unit"])
486
+
487
+ @handleNotSupported
488
+ def getSuctionGasTemperature(self) -> float:
489
+ return float(self.getProperty("heating.sensors.temperature.suctionGas")["properties"]["value"]["value"])
490
+
491
+ @handleNotSupported
492
+ def getSuctionGasTemperatureUnit(self) -> str:
493
+ return str(self.getProperty("heating.sensors.temperature.suctionGas")["properties"]["value"]["unit"])
494
+
495
+ # Main ECU runtime
496
+ @handleNotSupported
497
+ def getMainECURuntime(self) -> int:
498
+ return int(self.getProperty("heating.device.mainECU")["properties"]["runtime"]["value"])
499
+
500
+ @handleNotSupported
501
+ def getMainECURuntimeUnit(self) -> str:
502
+ return str(self.getProperty("heating.device.mainECU")["properties"]["runtime"]["unit"])
503
+
504
+ # Configuration values
505
+ @handleNotSupported
506
+ def getConfigurationBufferTemperatureMax(self) -> float:
507
+ return float(self.getProperty("heating.configuration.buffer.temperature.max")["properties"]["value"]["value"])
508
+
509
+ @handleNotSupported
510
+ def getConfigurationBufferTemperatureMaxUnit(self) -> str:
511
+ return str(self.getProperty("heating.configuration.buffer.temperature.max")["properties"]["value"]["unit"])
512
+
513
+ @handleNotSupported
514
+ def getConfigurationOutsideTemperatureDampingFactor(self) -> int:
515
+ return int(self.getProperty("heating.configuration.temperature.outside.DampingFactor")["properties"]["value"]["value"])
516
+
517
+ @handleNotSupported
518
+ def getConfigurationOutsideTemperatureDampingFactorUnit(self) -> str:
519
+ return str(self.getProperty("heating.configuration.temperature.outside.DampingFactor")["properties"]["value"]["unit"])
520
+
521
+ @handleNotSupported
522
+ def getConfigurationHeatingRodDHWApproved(self) -> bool:
523
+ return bool(self.getProperty("heating.configuration.heatingRod.dhw")["properties"]["useApproved"]["value"])
524
+
525
+ @handleNotSupported
526
+ def getConfigurationHeatingRodHeatingApproved(self) -> bool:
527
+ return bool(self.getProperty("heating.configuration.heatingRod.heating")["properties"]["useApproved"]["value"])
528
+
529
+ @handleNotSupported
530
+ def getConfigurationDHWHeaterApproved(self) -> bool:
531
+ return bool(self.getProperty("heating.configuration.dhwHeater")["properties"]["useApproved"]["value"])
532
+
325
533
  # Cooling circuits
326
534
  @property
327
535
  def coolingCircuits(self) -> List[CoolingCircuit]:
@@ -356,6 +564,7 @@ class CoolingCircuit(HeatingDeviceWithComponent):
356
564
  return bool(self.getProperty(f"heating.coolingCircuits.{self.circuit}.reverse")["properties"]["active"]["value"])
357
565
 
358
566
 
567
+
359
568
  class Compressor(HeatingDeviceWithComponent):
360
569
 
361
570
  @property
@@ -370,25 +579,45 @@ class Compressor(HeatingDeviceWithComponent):
370
579
  def getHours(self):
371
580
  return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hours"]["value"]
372
581
 
373
- @handleNotSupported
374
582
  def getHoursLoadClass1(self):
375
- return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassOne"]["value"]
583
+ """Get hours in load class 1. Tries 'statistics' path first, then 'statistics.load'."""
584
+ with suppress(KeyError):
585
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassOne"]["value"]
586
+ with suppress(KeyError):
587
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics.load")["properties"]["hoursLoadClassOne"]["value"]
588
+ raise PyViCareNotSupportedFeatureError("getHoursLoadClass1")
376
589
 
377
- @handleNotSupported
378
590
  def getHoursLoadClass2(self):
379
- return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassTwo"]["value"]
591
+ """Get hours in load class 2. Tries 'statistics' path first, then 'statistics.load'."""
592
+ with suppress(KeyError):
593
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassTwo"]["value"]
594
+ with suppress(KeyError):
595
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics.load")["properties"]["hoursLoadClassTwo"]["value"]
596
+ raise PyViCareNotSupportedFeatureError("getHoursLoadClass2")
380
597
 
381
- @handleNotSupported
382
598
  def getHoursLoadClass3(self):
383
- return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassThree"]["value"]
599
+ """Get hours in load class 3. Tries 'statistics' path first, then 'statistics.load'."""
600
+ with suppress(KeyError):
601
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassThree"]["value"]
602
+ with suppress(KeyError):
603
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics.load")["properties"]["hoursLoadClassThree"]["value"]
604
+ raise PyViCareNotSupportedFeatureError("getHoursLoadClass3")
384
605
 
385
- @handleNotSupported
386
606
  def getHoursLoadClass4(self):
387
- return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassFour"]["value"]
607
+ """Get hours in load class 4. Tries 'statistics' path first, then 'statistics.load'."""
608
+ with suppress(KeyError):
609
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassFour"]["value"]
610
+ with suppress(KeyError):
611
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics.load")["properties"]["hoursLoadClassFour"]["value"]
612
+ raise PyViCareNotSupportedFeatureError("getHoursLoadClass4")
388
613
 
389
- @handleNotSupported
390
614
  def getHoursLoadClass5(self):
391
- return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassFive"]["value"]
615
+ """Get hours in load class 5. Tries 'statistics' path first, then 'statistics.load'."""
616
+ with suppress(KeyError):
617
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics")["properties"]["hoursLoadClassFive"]["value"]
618
+ with suppress(KeyError):
619
+ return self.getProperty(f"heating.compressors.{self.compressor}.statistics.load")["properties"]["hoursLoadClassFive"]["value"]
620
+ raise PyViCareNotSupportedFeatureError("getHoursLoadClass5")
392
621
 
393
622
  @handleNotSupported
394
623
  def getActive(self):
@@ -398,6 +627,24 @@ class Compressor(HeatingDeviceWithComponent):
398
627
  def getPhase(self):
399
628
  return self.getProperty(f"heating.compressors.{self.compressor}")["properties"]["phase"]["value"]
400
629
 
630
+ @handleNotSupported
631
+ def getPower(self) -> float:
632
+ # Returns the nominal/maximum power of the compressor in kW
633
+ return float(self.getProperty(f"heating.compressors.{self.compressor}.power")["properties"]["value"]["value"])
634
+
635
+ @handleNotSupported
636
+ def getPowerUnit(self) -> str:
637
+ return str(self.getProperty(f"heating.compressors.{self.compressor}.power")["properties"]["value"]["unit"])
638
+
639
+ @handleNotSupported
640
+ def getModulation(self) -> int:
641
+ # Returns the current compressor modulation/power level as percentage (0-100)
642
+ return int(self.getProperty(f"heating.compressors.{self.compressor}.sensors.power")["properties"]["value"]["value"])
643
+
644
+ @handleNotSupported
645
+ def getModulationUnit(self) -> str:
646
+ return str(self.getProperty(f"heating.compressors.{self.compressor}.sensors.power")["properties"]["value"]["unit"])
647
+
401
648
  @handleNotSupported
402
649
  def getSpeed(self) -> int:
403
650
  return int(self.getProperty(f"heating.compressors.{self.compressor}.speed.current")["properties"]["value"]["value"])
@@ -368,6 +368,15 @@ class HeatingDevice(Device):
368
368
  return self.getProperty("heating.primaryCircuit.sensors.temperature.return")["properties"]["value"][
369
369
  "value"]
370
370
 
371
+ @handleNotSupported
372
+ def getPrimaryCircuitPumpRotation(self) -> float:
373
+ """Get primary circuit pump rotation/speed as percentage."""
374
+ return float(self.getProperty("heating.primaryCircuit.sensors.rotation")["properties"]["value"]["value"])
375
+
376
+ @handleNotSupported
377
+ def getPrimaryCircuitPumpRotationUnit(self):
378
+ return self.getProperty("heating.primaryCircuit.sensors.rotation")["properties"]["value"]["unit"]
379
+
371
380
  @handleNotSupported
372
381
  def getSupplyTemperatureSecondaryCircuit(self):
373
382
  return self.getProperty("heating.secondaryCircuit.sensors.temperature.supply")["properties"]["value"][
@@ -548,6 +557,15 @@ class HeatingCircuit(HeatingDeviceWithComponent):
548
557
  self.getProperty(f"heating.circuits.{self.circuit}.sensors.temperature.supply")["properties"][
549
558
  "value"]["value"]
550
559
 
560
+ @handleNotSupported
561
+ def getTargetTemperature(self) -> float:
562
+ """Get the circuit target temperature."""
563
+ return float(self.getProperty(f"heating.circuits.{self.circuit}.temperature")["properties"]["value"]["value"])
564
+
565
+ @handleNotSupported
566
+ def getTargetTemperatureUnit(self):
567
+ return self.getProperty(f"heating.circuits.{self.circuit}.temperature")["properties"]["value"]["unit"]
568
+
551
569
  @handleNotSupported
552
570
  def getRoomTemperature(self):
553
571
  return self.getProperty(f"heating.circuits.{self.circuit}.sensors.temperature.room")["properties"][
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "PyViCare"
3
- version = "2.57.0"
3
+ version = "2.58.0"
4
4
  description = "Library to communicate with the Viessmann ViCare API."
5
5
  authors = [
6
6
  "Simon Gillet <mail+pyvicare@gillet.ninja>"
File without changes
File without changes
File without changes