diff --git a/PyViCare/PyViCareGazBoiler.py b/PyViCare/PyViCareGazBoiler.py index 0098b584..c46ccc09 100644 --- a/PyViCare/PyViCareGazBoiler.py +++ b/PyViCare/PyViCareGazBoiler.py @@ -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): diff --git a/tests/test_Vitodens100W.py b/tests/test_Vitodens100W.py index 2022577d..e85450f0 100644 --- a/tests/test_Vitodens100W.py +++ b/tests/test_Vitodens100W.py @@ -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")