Skip to content

Commit

Permalink
Merge pull request openviess#29 from o00batman00o/AddOilBurnerSupport
Browse files Browse the repository at this point in the history
Add oil burner support
  • Loading branch information
somm15 authored Mar 23, 2020
2 parents e2a367e + f008a38 commit 1c1f6b8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PyViCare/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__all__ = ['PyViCareService''PyViCareDevice','PyViCareGazBoiler','PyViCareHeatPump','PyViCareCachedService']
__all__ = ['PyViCareService''PyViCareDevice','PyViCareGazBoiler','PyViCareHeatPump','PyViCareCachedService','PyViCareOilBoiler']
33 changes: 33 additions & 0 deletions PyViCareOilBoiler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from PyViCare.PyViCareDevice import Device

class OilBoiler(Device):

def getBurnerActive(self):
try:
return self.service.getProperty("heating.burner")["properties"]["active"]["value"]
except KeyError:
return "error"

def getBurnerModulation(self):
try:
return self.service.getProperty('heating.burner.modulation')["properties"]["value"]["value"]
except KeyError:
return "error"

def getBoilerTemperature(self):
try:
return self.service.getProperty("heating.boiler.sensors.temperature.main")["properties"]["value"]["value"]
except KeyError:
return "error"

def getBurnerHours(self):
try:
return self.service.getProperty('heating.burner.statistics')['properties']['hours']['value']
except KeyError:
return "error"

def getBurnerStarts(self):
try:
return self.service.getProperty('heating.burner.statistics')['properties']['starts']['value']
except KeyError:
return "error"

0 comments on commit 1c1f6b8

Please sign in to comment.