Skip to content

Revert Hue color state to be xy-based#14154

Merged
amelchio merged 1 commit intohome-assistant:devfrom
amelchio:hue-ignore-mode
Apr 29, 2018
Merged

Revert Hue color state to be xy-based#14154
amelchio merged 1 commit intohome-assistant:devfrom
amelchio:hue-ignore-mode

Conversation

@amelchio
Copy link
Copy Markdown
Contributor

Description:

Apparently, the colormode of Hue lights cannot be trusted (see #14119). This PR reverts to always use the xy attribute for colors, like we did before the hue/sat conversion.

For reference, the pre-hue/sat implementation is here: https://github.com/home-assistant/home-assistant/blob/0.65.6/homeassistant/components/light/hue.py#L250-L255

Related issue (if applicable): fixes #14119

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox.

@omriasta
Copy link
Copy Markdown
Contributor

Funny you should ask...I installed the 0.68 final and then deleted the custom component you created. I noticed that kitchen lights were displaying correctly but living room went back to green for some reason. I checked the hue debug and colormode was actually xy this time. Also noticed that kitchen lights now switched to ct for colormode....I'm a bit baffelled by this so not sure what the issue is anymore. I added back the custom component and both were displaying correctly...I'll try this one shortly and let you know.

@omriasta
Copy link
Copy Markdown
Contributor

How do I test this? I noticed 2 files hue.py and test hue. Which ones do I copy to the custom component folder?

@amelchio
Copy link
Copy Markdown
Contributor Author

Only hue.py

@omriasta
Copy link
Copy Markdown
Contributor

This one works as well to fix all my groups. The older one also fixed all 3 but I guess it was not merged into 0.68 final?

@amelchio
Copy link
Copy Markdown
Contributor Author

Thanks for confirming. You are right, my initial fix did not make it into 0.68 final.

This one (which builds on #14113) is now so simple, I think we could add it to 0.68.1 but I would like a second opinion on that. Maybe @armills again?

@emlove
Copy link
Copy Markdown
Contributor

emlove commented Apr 29, 2018

I'd be fine with this myself. 👍

@omriasta
Copy link
Copy Markdown
Contributor

I also reported the issue on the hue developer site. I'm no developer but it seems odd that colormode would act so randomly and couldn't find any indication on how the bridge determines this.

@amelchio amelchio added this to the 0.68.1 milestone Apr 29, 2018
@amelchio
Copy link
Copy Markdown
Contributor Author

All right, I have added those two PRs to the 0.68.1 milestone and that should finally get us back to how things worked before the big hue/sat cleanup.

@amelchio amelchio merged commit 30d987f into home-assistant:dev Apr 29, 2018
balloob pushed a commit that referenced this pull request Apr 30, 2018
@balloob balloob mentioned this pull request Apr 30, 2018
@amelchio amelchio mentioned this pull request May 1, 2018
3 tasks
@Mariusthvdb
Copy link
Copy Markdown
Contributor

Mariusthvdb commented May 1, 2018

struggling with the latest Hassio updates and Hue, please let me ask: is this hue.py mentioned by @amelchio still necessary in custom_components? Or is 68.0 using native Hue support, and shouldn't the hue.py be in /custom_components any longer .
Thanks.

@omriasta
Copy link
Copy Markdown
Contributor

omriasta commented May 1, 2018

You have to update to 0.68.1 for this fix, you don't need the separate file in custom components if you have this version.

@Mariusthvdb
Copy link
Copy Markdown
Contributor

Mariusthvdb commented May 2, 2018

Yes, thanks, I am on .68 so hope to do so when Hassio comes back... (btw thanks @omrastia, missed your replay before, sorry)

Still, my question was wether we need the CC Hue.py or not ?

@amelchio
Copy link
Copy Markdown
Contributor Author

amelchio commented May 2, 2018

Remove the hue.py file from custom_components.

@Mariusthvdb
Copy link
Copy Markdown
Contributor

Remove the hue.py file from custom_components.

thanks, I have done so, and updated to .68.1

Hue still behaving oddly, disconnecting and connecting randomly, showing the unavailable more than desired... but that's another thread I suppose.

xy-related: which is your preferred xy-rgb calculator ?

thanks!

@MartinHjelmare
Copy link
Copy Markdown
Member

Please move the discussion to an issue.

@home-assistant home-assistant locked as resolved and limited conversation to collaborators May 2, 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.

Hue Lights don't display color correctly in the UI

7 participants