Skip to content
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

Allow setting hvac mode through set_temperature climate method in Gree integration #101196

Merged

Conversation

MislavMandaric
Copy link
Contributor

@MislavMandaric MislavMandaric commented Oct 1, 2023

Proposed change

Support for handling optional hvac_mode parameter when calling climate.set_temperature on Gree integration, as per the docs.

Previously this parameter was ignored.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • I have followed the [perfect PR recommendations][perfect-pr]
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Oct 1, 2023

Hey there @cmroche, mind taking a look at this pull request as it has been labeled with an integration (gree) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of gree can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign gree Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@MislavMandaric MislavMandaric marked this pull request as ready for review October 1, 2023 12:20
@@ -407,6 +414,58 @@ async def test_send_target_temperature(
state.attributes.get(ATTR_CURRENT_TEMPERATURE)
== fake_device.current_temperature
)
assert state.state == HVAC_MODES.get(fake_device.mode)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a check that hvac mode didn't change in existing test for setting the temperature, while the new test checks that both temperature and hvac mode got changed.

@home-assistant home-assistant bot marked this pull request as draft October 1, 2023 12:33
@home-assistant
Copy link

home-assistant bot commented Oct 1, 2023

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
@MislavMandaric MislavMandaric marked this pull request as ready for review October 2, 2023 18:03
tests/components/gree/test_climate.py Outdated Show resolved Hide resolved
tests/components/gree/test_climate.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft October 3, 2023 10:29
@MislavMandaric MislavMandaric marked this pull request as ready for review October 18, 2023 06:03
Copy link
Member

@gjohansson-ST gjohansson-ST left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MislavMandaric 👍

@gjohansson-ST gjohansson-ST merged commit 84b71c9 into home-assistant:dev Oct 30, 2023
23 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2023
@MislavMandaric MislavMandaric deleted the gree-climate-set-temp-hvac branch November 1, 2023 10:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants