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
Improve climate turn_on/turn_off services for zwave_js #109187
Conversation
Hey there @home-assistant/z-wave, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
This comment was marked as resolved.
This comment was marked as resolved.
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.
Please add tests to the climate integration to ensure the new flag works as intended
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Once #109195 is merged we just need to merge dev into this PR and it will be ready to review |
no longer relevant since the change mentioned was merged in a separate PR
…t#109187) Co-authored-by: Erik Montnemery <erik@montnemery.com>
Breaking change
For Z-Wave
climate
entities, the behavior of theclimate.turn_on
service has changed. Previously, the service would act in the following order depending on whether the corresponding conditions were met:off
mode and exactly one additional mode,climate.turn_on
would set the mode to the additional mode.heat_cool
,heat
,cool
Now, the service follows the following behavior in order:
resume
thermostat mode, it will be used to restore the last mode you used before the entity was turned off.off
mode since the integration will not know what the previous mode was.heat_cool
,heat
,cool
(no change to condition 2 above)dry
orfan_only
)Proposed change
The trigger for this PR was the change that requires integrations to explicitly add supported features for TURN_ON and TURN_OFF. While making this change, I realized that I could improve the existing fallback logic for these services in the
ClimateEntity
by defining my own turn on and turn off methods. You can see a description of the changed behavior in the breaking changes section.Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: