Skip to content

Commit

Permalink
issue with reading power consumption from GazBoiler
Browse files Browse the repository at this point in the history
- current power consumption no longer available
- split up power consumption in days, weeks, months and years as well
  • Loading branch information
steve-brischke committed Oct 21, 2020
1 parent 5c38bea commit 6f91fdf
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions PyViCare/PyViCareGazBoiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,51 @@ def getBoilerTemperature(self):
except KeyError:
return "error"

def getCurrentPower(self):
def getPowerConsumptionDays(self):
try:
return self.service.getProperty('heating.burner.current.power')['properties']['value']['value']
return self.service.getProperty('heating.power.consumption.total')['properties']['day']['value']
except KeyError:
return "error"

def getPowerConsumptionToday(self):
try:
return self.service.getProperty('heating.power.consumption.total')['properties']['day']['value'][0]
except KeyError:
return "error"

def getPowerConsumptionWeeks(self):
try:
return self.service.getProperty('heating.power.consumption.total')['properties']['week']['value']
except KeyError:
return "error"

def getPowerConsumptionThisWeek(self):
try:
return self.service.getProperty('heating.power.consumption.total')['properties']['week']['value'][0]
except KeyError:
return "error"

def getPowerConsumptionMonths(self):
try:
return self.service.getProperty('heating.power.consumption.total')['properties']['month']['value']
except KeyError:
return "error"

def getPowerConsumptionThisMonth(self):
try:
return self.service.getProperty('heating.power.consumption.total')['properties']['month']['value'][0]
except KeyError:
return "error"

def getPowerConsumptionYears(self):
try:
return self.service.getProperty('heating.power.consumption.total')['properties']['year']['value']
except KeyError:
return "error"

def getPowerConsumptionThisYear(self):
try:
return self.service.getProperty('heating.power.consumption.total')['properties']['year']['value'][0]
except KeyError:
return "error"

Expand Down

0 comments on commit 6f91fdf

Please sign in to comment.