Skip to content

Commit

Permalink
Update PyViCareHeatingDevice.py (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
CFenner authored Nov 19, 2023
1 parent 8ba4114 commit e988a38
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions PyViCare/PyViCareHeatingDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,41 @@ def getHeatingCurveShift(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["properties"]["shift"][
"value"]

@handleNotSupported
def getHeatingCurveShiftMin(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["commands"]["setCurve"]["params"][
"shift"]["constraints"]["min"]

@handleNotSupported
def getHeatingCurveShiftMax(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["commands"]["setCurve"]["params"][
"shift"]["constraints"]["max"]

@handleNotSupported
def getHeatingCurveShiftStepping(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["commands"]["setCurve"]["params"][
"shift"]["constraints"]["stepping"]

@handleNotSupported
def getHeatingCurveSlope(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["properties"]["slope"][
"value"]

@handleNotSupported
def getHeatingCurveSlopeMin(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["commands"]["setCurve"]["params"][
"slope"]["constraints"]["min"]

@handleNotSupported
def getHeatingCurveSlopeMax(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["commands"]["setCurve"]["params"][
"slope"]["constraints"]["max"]

@handleNotSupported
def getHeatingCurveSlopeStepping(self):
return self.service.getProperty(f"heating.circuits.{self.circuit}.heating.curve")["commands"]["setCurve"]["params"][
"slope"]["constraints"]["stepping"]

@handleAPICommandErrors
def setHeatingCurve(self, shift, slope):
return self.service.setProperty(f"heating.circuits.{self.circuit}.heating.curve", "setCurve",
Expand Down

0 comments on commit e988a38

Please sign in to comment.