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

Fix zha ikea starkvind capabilities and modes being incorrectly exposed #114854

Closed
wants to merge 1 commit into from

Conversation

freundTech
Copy link

@freundTech freundTech commented Apr 4, 2024

Fixes #97440.
Previously starkvind exposed 10 speed settings and no modes, where 10% corresponded to auto mode and 20%-100% corresponded to fixed speeds.

Proposed change

This patch correctly exposes auto mode as a mode. It also adds support for showing the actual fan speed while auto mode is enabled.
Starkvind supports 9 fan speeds. Because 9 doesn't neatly fit into 100% I cheated a bit and divided the 100% into 10% increments, where trying to set the fan to 10% sets it to 20% instead. I believe that this gives the overall better user experience compared to having 11.11% increments. The 5 speed modes present on the physical interface of the device correspond to HA speed settings 20%, 40%, 60% and 100%.

This patch depends on zigpy/zha-device-handlers#3088 being merged and released.

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

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format 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.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Apr 4, 2024

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

Code owner commands

Code owners of zha 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 zha Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@MartinHjelmare MartinHjelmare changed the title zha: ikea: starkvind: Fix capabilities and modes being incorrectly exposed Fix zha ikea starkvind capabilities and modes being incorrectly exposed Apr 5, 2024
@TheJulianJES
Copy link
Member

TheJulianJES commented Apr 7, 2024

Nice, thanks! I plan to test both your PRs soon.
I'll mark the PR as a draft for now, as it depends on the quirks PR. It's still on my list to review/test though.

@TheJulianJES TheJulianJES marked this pull request as draft April 7, 2024 17:58
@dvandijk27
Copy link

@TheJulianJES Heyy any update? This fix whould be amazing

@freundTech freundTech marked this pull request as ready for review May 29, 2024 14:35
@freundTech
Copy link
Author

Now that zigpy/zha-device-handlers#3088 is merged I rebased this on dev and bumped the zha-quirks dependency to 0.0.116 (Note that that version isn't released yet).

…posed

Fixes home-assistant#97440
Previously starkvind exposed 10 speed settings and no modes, where 10% corresponded to auto mode
and 20%-100% corresponded to fixed speeds.

This patch correctly exposes auto mode as a mode. It also adds support for showing the actual
fan speed while auto mode is enabled.
Starkvind supports 9 fan speeds. Because 9 doesn't neatly fit into 100% I cheated a bit and divided
the 100% into 10% increments, where trying to set the fan to 10% sets it to 20% instead. I believe
that this gives the overall better user experience compared to having 11.11% increments.
The 5 speed modes present on the physical interface of the device correspond to HA speed settings 20%,
40%, 60% and 100%.

This patch depends on zigpy/zha-device-handlers#3088 being merged and released.
@freundTech
Copy link
Author

@TheJulianJES Any update on when this might get reviewed?
I just rebased on dev again to fix conflicts.

@TheJulianJES
Copy link
Member

Haven't forgotten about this. There'll be some major ZHA changes coming and to avoid conflicts for now, we'll try to get that finished first (hopefully for the August release).

@frenck
Copy link
Member

frenck commented Jul 6, 2024

I'm marking this PR as a draft while we are waiting for those larger changes to happen.

This helps us clearing/getting a better overview of the review queue.

../Frenck

@frenck frenck marked this pull request as draft July 6, 2024 12:13
@dmulcahey
Copy link
Contributor

We have recently migrated the core of ZHA to its own library. Please open a pull request here: https://github.com/zigpy/zha for this. Sorry for the inconvenience and Thanks!

@dmulcahey dmulcahey closed this Jul 10, 2024
@freundTech
Copy link
Author

I'll try to find some time to rebase this next week. I guess the changes have been big enough that I should retest and adjust this?
Or do I just have to apply my patch to the new repo and resubmitt it?

@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2024
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.

IKEA Starkvind fan setting wrong
7 participants