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

Hue: Use the currently active color mode #13376

Merged
merged 3 commits into from
Mar 23, 2018
Merged

Conversation

emlove
Copy link
Contributor

@emlove emlove commented Mar 21, 2018

Description:

This PR updates hue to only report the color from the active color mode. I've noticed that currently when lights are in color temperature mode, the bulbs icons on the frontend are shown with a stale RGB color. I think this was a side-effect of the aiohue conversion.

I also noticed when writing the tests that we're not rounding float hue/sat values that are returned as attributes. I've included a fix here for that as well since it affects the tests.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

@emlove emlove force-pushed the hue-return-appropriate-color branch from 99ecba5 to 7108746 Compare March 21, 2018 22:40
@balloob balloob merged commit 2497dd5 into dev Mar 23, 2018
@balloob balloob deleted the hue-return-appropriate-color branch March 23, 2018 18:01
@@ -22,6 +22,7 @@ Icon

# pytest
.pytest_cache
.cache
Copy link
Member

Choose a reason for hiding this comment

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

You're using an old version of pytest. Since 3.4.0 pytest will create the cache directory in .pytest_cache. See #13308 :)

(I think we can still leave it there for users with old pytest versions)

Copy link
Member

Choose a reason for hiding this comment

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

Aah, I was already noticing that dir and was like: where did it come from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good call! In any case I'm sure ignoring .cache doesn't hurt.

@balloob balloob mentioned this pull request Mar 30, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
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.

4 participants