-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add turn_on method to ecobee climate platform #27103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 1 tiny comment.
Ready to go! |
🎉 🎉 🎉 🎉 |
Actually thinking now (I know, maybe a little too late), shouldn't we make this part of the default turn_on command handling, for all climate entities ? |
@balloob you’re probably right... I’ll take a look! |
Thank you very much for working on this! |
Breaking Change:
Previously, calling
climate.turn_on
would cause the ecobee thermostat to turn on inheat
mode, regardless of the mode when the thermostat was turned off. Now, the thermostat will turn on to the last "active" HVAC mode (i.e. "heat", "cool", or "auto") (or, if the thermostat was "off" when Home Assistant started, to "auto").Description:
With no turn_on method in the ecobee climate platform,
climate.turn_on
was causing the ecobee thermostat to always turn on in "heat" mode (as a result of using the "fake" turn on inasync_turn_on
from the climate entity class). This PR adds a variable (self._last_active_hvac_mode
) to track the last "active" (i.e. non-off) HVAC mode, and updates it inasync_update
with the latest non-off state retrieved from the ecobee API. And, theturn_on
method sets the HVAC mode to the value contained inself._last_active_hvac_mode
, which should be more intuitive for users.Related issue (if applicable): fixes #27091
Pull request with documentation for home-assistant.io (if applicable): N/A
Example entry for
configuration.yaml
(if applicable):N/A
Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: