Improve precision of Hue color state#14113
Merged
pvizeli merged 1 commit intohome-assistant:devfrom Apr 27, 2018
Merged
Conversation
pvizeli
approved these changes
Apr 27, 2018
|
Unfortunately this results in the following periodic error for me: Anything I can do to fix this? |
3 tasks
Contributor
Author
|
Thanks for reporting, I think #14230 should fix that. BTW please do not comment in closed tickets but rather create a new issue when you find a new bug 👍 |
|
Cool, thanks. You are of course right about the issue, apologies :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
We are currently setting colors using the xy API of Hue and getting HS values, converting each as necessary.
However, xy<->HS conversions are bulb dependent so we cannot match the conversion done in-bulb.
This PR changes to read out the true xy value that was set. We will still do some conversions but the errors should cancel out because it's now all done inside HA.
The change had some testing in the linked issue though I do not have Hue bulbs myself.
(Note that this PR only makes each separate attribute consistent between write-read. Conversions are still unpredictable across color models. Setting xy, reading HS and then setting that HS will not give the original xy value.)
Related issue (if applicable): fixes #13944
Checklist:
tox.