Skip to content

Commit

Permalink
add a method to set aux heat cutover setting
Browse files Browse the repository at this point in the history
  • Loading branch information
djk121 authored and nkgilley committed Dec 21, 2021
1 parent 7bf6417 commit ba659b8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pyecobee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,24 @@ def set_ventilator_timer(self, index: int, ventilator_on: bool) -> None:
except (ExpiredTokenError, InvalidTokenError) as err:
raise err

def set_aux_cutover_threshold(self, index: int, threshold: int) -> None:
"""Set the threshold for outdoor temp below which alt heat will be used."""
body = {
"selection": {
"selectionType": "thermostats",
"selectionMatch": self.thermostats[index]["identifier"],
},
"thermostat": {"settings": {"compressorProtectionMinTemp": int(threshold * 10)}},
}
log_msg_action = "set outdoor temp threshold for aux"

try:
self._request_with_refresh(
"POST", ECOBEE_ENDPOINT_THERMOSTAT, log_msg_action, body=body
)
except (ExpiredTokenError, InvalidTokenError) as err:
raise err

def _request_with_refresh(
self,
method: str,
Expand Down

0 comments on commit ba659b8

Please # to comment.