forked from openviess/PyViCare
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openviess#29 from o00batman00o/AddOilBurnerSupport
Add oil burner support
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |