Skip to content

Commit

Permalink
Merge pull request openviess#4 from oischinger/fixdhwconsumption
Browse files Browse the repository at this point in the history
Fix dhw gas consumption properties
  • Loading branch information
somm15 authored Jan 16, 2019
2 parents ca04541 + 88b44ba commit 9c38db9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions PyViCare/PyViCare.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,49 +466,49 @@ def getGasConsumptionHeatingThisYear(self):

def getGasConsumptionDomesticHotWaterDays(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['day']['value']
return self.getProperty('heating.gas.consumption.dhw')['properties']['day']['value']
except KeyError:
return "error"

def getGasConsumptionDomesticHotWaterToday(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['day']['value'][0]
return self.getProperty('heating.gas.consumption.dhw')['properties']['day']['value'][0]
except KeyError:
return "error"

def getGasConsumptionDomesticHotWaterWeeks(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['week']['value']
return self.getProperty('heating.gas.consumption.dhw')['properties']['week']['value']
except KeyError:
return "error"

def getGasConsumptionDomesticHotWaterThisWeek(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['week']['value'][0]
return self.getProperty('heating.gas.consumption.dhw')['properties']['week']['value'][0]
except KeyError:
return "error"

def getGasConsumptionDomesticHotWaterMonths(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['month']['value']
return self.getProperty('heating.gas.consumption.dhw')['properties']['month']['value']
except KeyError:
return "error"

def getGasConsumptionDomesticHotWaterThisMonth(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['month']['value'][0]
return self.getProperty('heating.gas.consumption.dhw')['properties']['month']['value'][0]
except KeyError:
return "error"

def getGasConsumptionDomesticHotWaterYears(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['year']['value']
return self.getProperty('heating.gas.consumption.dhw')['properties']['year']['value']
except KeyError:
return "error"

def getGasConsumptionDomesticHotWaterThisYear(self):
try:
return self.getProperty('heating.gas.consumption.heating')['properties']['year']['value'][0]
return self.getProperty('heating.gas.consumption.dhw')['properties']['year']['value'][0]
except KeyError:
return "error"

0 comments on commit 9c38db9

Please sign in to comment.