Skip to content

Commit

Permalink
fix: correct unit getter for heating.gas.consumption.summary.dhw (#380)
Browse files Browse the repository at this point in the history
fix: correct unit getter for heating.gas.consumption.summary.dhw (#9)

* Update PyViCareGazBoiler.py

* Update test_Vitodens100W.py

* Update PyViCareGazBoiler.py
  • Loading branch information
CFenner authored Sep 6, 2024
1 parent e6e189e commit 950fd65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PyViCare/PyViCareGazBoiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def getGasSummaryConsumptionHeatingLastYear(self):
# Gas consumption for Domestic Hot Water data:
@handleNotSupported
def getGasSummaryConsumptionDomesticHotWaterUnit(self):
return self.service.getProperty("heating.gas.consumption.summary.dhw")["properties"]["day"]["unit"]
return self.service.getProperty("heating.gas.consumption.summary.dhw")["properties"]["unit"]["value"]

@handleNotSupported
def getGasSummaryConsumptionDomesticHotWaterCurrentDay(self):
Expand Down
3 changes: 3 additions & 0 deletions tests/test_Vitodens100W.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ def test_getPowerSummaryConsumptionHeatingCurrentDay(self):

def test_getPowerSummaryConsumptionDomesticHotWaterCurrentYear(self):
self.assertEqual(self.device.getPowerSummaryConsumptionDomesticHotWaterCurrentYear(), 18)

def test_getGasSummaryConsumptionDomesticHotWaterUnit(self):
self.assertEqual(self.device.getGasSummaryConsumptionDomesticHotWaterUnit(), "cubicMeter")

0 comments on commit 950fd65

Please sign in to comment.