{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/19123","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/19123/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/19123/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/19123/events","html_url":"https://github.com/home-assistant/home-assistant/pull/19123","id":388925414,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MDcwMDMz","number":19123,"title":"Improve Philips Hue color conversion","user":{"login":"starkillerOG","id":14811189,"node_id":"MDQ6VXNlcjE0ODExMTg5","avatar_url":"https://avatars0.githubusercontent.com/u/14811189?v=4","gravatar_id":"","url":"https://api.github.com/users/starkillerOG","html_url":"https://github.com/starkillerOG","followers_url":"https://api.github.com/users/starkillerOG/followers","following_url":"https://api.github.com/users/starkillerOG/following{/other_user}","gists_url":"https://api.github.com/users/starkillerOG/gists{/gist_id}","starred_url":"https://api.github.com/users/starkillerOG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkillerOG/subscriptions","organizations_url":"https://api.github.com/users/starkillerOG/orgs","repos_url":"https://api.github.com/users/starkillerOG/repos","events_url":"https://api.github.com/users/starkillerOG/events{/privacy}","received_events_url":"https://api.github.com/users/starkillerOG/received_events","type":"User","site_admin":false},"labels":[{"id":527871105,"node_id":"MDU6TGFiZWw1Mjc4NzExMDU=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/cla-signed","name":"cla-signed","color":"008000","default":false},{"id":955422305,"node_id":"MDU6TGFiZWw5NTU0MjIzMDU=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/in%20progress","name":"in progress","color":"ededed","default":false},{"id":528094595,"node_id":"MDU6TGFiZWw1MjgwOTQ1OTU=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/platform:%20light.hue","name":"platform: light.hue","color":"ededed","default":false},{"id":832964196,"node_id":"MDU6TGFiZWw4MzI5NjQxOTY=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/small-pr","name":"small-pr","color":"e5bd7e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-12-08T14:09:07Z","updated_at":"2018-12-11T14:57:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/19123","html_url":"https://github.com/home-assistant/home-assistant/pull/19123","diff_url":"https://github.com/home-assistant/home-assistant/pull/19123.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/19123.patch"},"body":"## Description:\r\nThe Philips Hue lights do not support the ordinarry color gammut, theirfore when a color is selected that the philips hue light cannot produce, the closest color that can be produced needs to be found.\r\nUsing a rgb to hs conversion that was made specifically for the philips hue lights, much closer colors can be produced.\r\nThis is most obvious when selecting pure blue: RGB:[0,0,255].\r\nThis PR theirfore improves color selection when selecting collors with high saturation (HSV with S=100%).\r\ncolors within the capability of the Hue lights are not changed by this PR, they will still be identical.\r\n\r\n**Related issue (if applicable):** fixes #<home-assistant issue number goes here>\r\n\r\n**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>\r\n\r\n## Example entry for `configuration.yaml` (if applicable):\r\n```yaml\r\n\r\n```\r\n\r\n## Checklist:\r\n  - [x] The code change is tested and works locally.\r\n  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**\r\n  - [x] There is no commented out code in this PR.\r\n\r\nIf user exposed functionality or configuration variables are added/changed:\r\n  - [x] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)\r\n\r\nIf the code communicates with devices, web services, or third-party tools:\r\n  - [x] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).\r\n  - [x] New dependencies are only imported inside functions that use them ([example][ex-import]).\r\n  - [x] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.\r\n  - [x] New files were added to `.coveragerc`.\r\n\r\nIf the code does not interact with devices:\r\n  - [x] Tests have been added to verify that the new code works.\r\n\r\n[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14\r\n[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/446231766","html_url":"https://github.com/home-assistant/home-assistant/pull/19123#issuecomment-446231766","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/19123","id":446231766,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjIzMTc2Ng==","user":{"login":"amelchio","id":26174915,"node_id":"MDQ6VXNlcjI2MTc0OTE1","avatar_url":"https://avatars3.githubusercontent.com/u/26174915?v=4","gravatar_id":"","url":"https://api.github.com/users/amelchio","html_url":"https://github.com/amelchio","followers_url":"https://api.github.com/users/amelchio/followers","following_url":"https://api.github.com/users/amelchio/following{/other_user}","gists_url":"https://api.github.com/users/amelchio/gists{/gist_id}","starred_url":"https://api.github.com/users/amelchio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amelchio/subscriptions","organizations_url":"https://api.github.com/users/amelchio/orgs","repos_url":"https://api.github.com/users/amelchio/repos","events_url":"https://api.github.com/users/amelchio/events{/privacy}","received_events_url":"https://api.github.com/users/amelchio/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T14:57:57Z","updated_at":"2018-12-11T14:57:57Z","author_association":"MEMBER","body":"First, IMO we should not import a library that duplicates functionality we already have; we should extend our own support or migrate our utility function to use the library.\r\n\r\nSecond, the A/B/C gamuts are very platform specific and I think the right place to put this functionality would be in `aiohue.light.RGB_to_xy()`, `aiohue.light.clamp_xy()` or something like that. But @balloob wrote the rules and he also wrote aiohue so it is probably better that he comments."}}
{"actor":{"display_login":"amelchio"}}