Skip to content

Commit b9ca65e

Browse files
authored
feat: enable getBoilerTemperature for Oil and PalletBoilers (#791)
refactor(boiler): move getBoilerTemperature to HeatingDevice base heating.boiler.sensors.temperature.main is also present on oil (Vitoladens) and pellets (Vitoligno/Ecotronic) boilers, but getBoilerTemperature lived on GazBoiler only, so OilBoiler/PelletsBoiler could not access it. Move it to the HeatingDevice base class, mirroring getBoilerCommonSupplyTemperature.
1 parent cff6b34 commit b9ca65e

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

PyViCare/PyViCareGazBoiler.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ def getGasConsumptionDomesticHotWaterYears(self):
9191
def getGasConsumptionDomesticHotWaterThisYear(self):
9292
return self.getProperty("heating.gas.consumption.dhw")["properties"]["year"]["value"][0]
9393

94-
@handleNotSupported
95-
def getBoilerTemperature(self):
96-
return self.getProperty("heating.boiler.sensors.temperature.main")["properties"]["value"]["value"]
97-
9894
@handleNotSupported
9995
def getBoilerTargetTemperature(self):
10096
return self.getProperty("heating.boiler.temperature")["properties"]["value"]["value"]

PyViCare/PyViCareHeatingDevice.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ def getReturnTemperatureSecondaryCircuit(self):
391391
def getBoilerCommonSupplyTemperature(self):
392392
return self.getProperty("heating.boiler.sensors.temperature.commonSupply")["properties"]["value"]["value"]
393393

394+
@handleNotSupported
395+
def getBoilerTemperature(self):
396+
return self.getProperty("heating.boiler.sensors.temperature.main")["properties"]["value"]["value"]
397+
394398

395399
class HeatingDeviceWithComponent:
396400
"""This is the base class for all heating components"""

tests/test_Ecotronic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ def test_getFuelUnit(self):
5858

5959
def test_getAshLevel(self):
6060
self.assertEqual(self.device.getAshLevel(), 43.7)
61+
62+
def test_getBoilerTemperature(self):
63+
self.assertEqual(self.device.getBoilerTemperature(), 63)

0 commit comments

Comments
 (0)