Skip to content

Commit

Permalink
feat(heat pump): Expose heating.spf.* data points (#490)
Browse files Browse the repository at this point in the history
expose heating.spf
  • Loading branch information
CFenner authored Jan 22, 2025
1 parent ff1460d commit ee3bbfa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
12 changes: 12 additions & 0 deletions PyViCare/PyViCareHeatPump.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,18 @@ def getSupplyPressure(self) -> float:
# Returns heating supply pressure
return float(self.service.getProperty("heating.sensors.pressure.supply")["properties"]["value"]["value"])

@handleNotSupported
def getSeasonalPerformanceFactorDHW(self) -> float:
return float(self.service.getProperty("heating.spf.dhw")["properties"]["value"]["value"])

@handleNotSupported
def getSeasonalPerformanceFactorHeating(self) -> float:
return float(self.service.getProperty("heating.spf.heating")["properties"]["value"]["value"])

@handleNotSupported
def getSeasonalPerformanceFactorTotal(self) -> float:
return float(self.service.getProperty("heating.spf.total")["properties"]["value"]["value"])


class Compressor(HeatingDeviceWithComponent):

Expand Down
3 changes: 0 additions & 3 deletions tests/test_TestForMissingProperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ def test_missingProperties(self):
'heating.scop.dhw', # deprecated
'heating.scop.heating', # deprecated
'heating.scop.total', # deprecated
'heating.spf.dhw',
'heating.spf.heating',
'heating.spf.total',
]

all_features = self.read_all_features()
Expand Down
5 changes: 5 additions & 0 deletions tests/test_Vitocal250A.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,8 @@ def test_getDomesticHotWaterStorageTemperature(self):
def test_getSupplyPressure(self):
self.assertEqual(self.device.getSupplyPressure(), 2.1)
self.assertEqual(self.device.getSupplyPressureUnit(), "bar")

def test_getSeasonalPerformanceFactor(self):
self.assertEqual(self.device.getSeasonalPerformanceFactorDHW(), 4.1)
self.assertEqual(self.device.getSeasonalPerformanceFactorHeating(), 3.2)
self.assertEqual(self.device.getSeasonalPerformanceFactorTotal(), 3.9)

0 comments on commit ee3bbfa

Please sign in to comment.