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 homekit handling of 0 light brightness and fan speed #29962
Fix homekit handling of 0 light brightness and fan speed #29962
Conversation
Stock component: -Light already on at minimum brightness With fix: -Light already on at minimum brightness (now mapped to 1%) Sorry for the music, had to mute the audio but cant find the option on Youtube. Of course there is countless other scenarios and devices not covered by these videos. But I just want to show you what I'm dealing with here. I believe the changes in this patch will result in the best experience for most devices. Devices should not report 0 brightness and rotation speed anyway so if it breaks for them technically they only work previously by accident. |
Please rebase your PR onto the latest |
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.
Ok to merge when build passes 🎉
fe4369c
to
973dcbd
Compare
* Fix homekit handling of 0 light brightness and fan speed * Update homekit tests for new initial brightness/speed value
Breaking Change:
None
Description:
Replaces the fix in #27076.
Background:
When you turn on a HomeKit accessory it will try and restore the last brightness/rotation speed. But if it is set to 0%, HomeKit will update the brightness to 100% as it thinks 0% is off. This leads to unexpected behaviors such as:
I tried to do a screen recording to document this bug but it seems I need a proper camera to capture what is going on. It was more obvious on v100, but ever since I updated to v103 I cannot easily show it on the screen recording any more because the actual device brightness de-syncs from the Home app.
How is it fixed:
Please see code comments to see more details.
Example entry for
configuration.yaml
(if applicable):None
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: