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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix humidifier state error in HomeKit #61432

Merged
merged 6 commits into from Jan 17, 2022

Conversation

qqaatw
Copy link
Contributor

@qqaatw qqaatw commented Dec 10, 2021

Proposed change

The default value of TargetHumidifierDehumidifierState in pyhap is 0, which stands for "HumidifierorDehumidifier", while the valid_values in HomeKit integration only supplies either 1 or 2 for it, leading to the error.

See here:
https://github.com/ikalchev/HAP-python/blob/bc5ecbf6701a3aefba7d9a7abadb28cbf233f451/pyhap/resources/characteristics.json#L1429-L1442

Edited: This PR is awaiting ikalchev/HAP-python@626c033 being included into HA Core, and then can be merged to actually address the error.

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

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
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

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

@qqaatw
Copy link
Contributor Author

qqaatw commented Dec 10, 2021

This PR is awaiting ikalchev/HAP-python@626c033 being included into HA Core, and then can be merged to actually address the error.

@MartinHjelmare MartinHjelmare marked this pull request as draft December 13, 2021 08:40
@bdraco bdraco added the waiting-for-upstream We're waiting for a change upstream label Dec 13, 2021
@bdraco
Copy link
Member

bdraco commented Jan 12, 2022

This should be good to rebase once #60220 merges

@qqaatw qqaatw force-pushed the fix_humidifier_homekit_error branch from d3f10df to 913526a Compare January 14, 2022 09:04
@qqaatw
Copy link
Contributor Author

qqaatw commented Jan 14, 2022

Done!

@bdraco bdraco self-requested a review January 14, 2022 09:29
@bdraco
Copy link
Member

bdraco commented Jan 14, 2022

If this is ready for review, please mark it ready for review.

It would be good to get a test for this as well

@bdraco bdraco removed the waiting-for-upstream We're waiting for a change upstream label Jan 14, 2022
@qqaatw qqaatw marked this pull request as ready for review January 14, 2022 09:31
@bdraco bdraco force-pushed the fix_humidifier_homekit_error branch from 913526a to 0d6e90a Compare January 17, 2022 04:55
@bdraco bdraco merged commit 64d0b89 into home-assistant:dev Jan 17, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2022
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.

HomeKit reports invalid dehumidifier state Problem related to exposing humidifier/dehumidifier to HomeKit
3 participants