8000 Fix hue lights for Philips and non-philips lights by groth-its · Pull Request #8905 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix hue lights for Philips and non-philips lights #8905

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

Merged
merged 1 commit into from
Aug 12, 2017

Conversation

groth-its
Copy link
Contributor

Description:

Fixes coding errors for getting current brightness state introduced when making the component compatible to OSRAM lights (#6122).
Since the original issue addressed in #6122 for OSRAM lights is also true for innr lights (they don't handle "effect": "none"), I decided to only set this parameter when a Philips light is controlled.
Lastly makes color temperature, xy and rgb all mutual exclusive.

Checklist:

  • [X ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass

@mention-bot
Copy link

@groth-its, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @michaelarnauts to be potential reviewers.

elif self.bridge_type == 'hue':
if self.info.get('manufacturername') != "OSRAM":
command['effect'] = 'none'
elif self.bridge_type == 'hue' and self.info.get('manufacturername') == 'Philips':

Choose a reason for hiding this comment

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

line too long (90 > 79 characters)

@@ -384,7 +384,7 @@ def turn_on(self, **kwargs):
hue, sat = color_util.color_xy_to_hs(*kwargs[ATTR_XY_COLOR])
command['hue'] = hue
command['sat'] = sat
command['bri'] = self.info['bri']
command['bri'] = self.info.get('bri')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is setting the brightness to the value that HA has cached, right? Can we simply delete the line and the bulb will maintain the current brightness (but change its hue and saturation)?

Copy link
Contributor Author
@groth-its groth-its Aug 11, 2017

Choose a reason for hiding this comment

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

Valid point, thanks a lot. I took care of that.

@balloob
Copy link
Member
balloob commented Aug 12, 2017

Thanks 🐬

@balloob balloob merged commit 489a02b into home-assistant:dev Aug 12, 2017
dethpickle pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
@balloob balloob mentioned this pull request Aug 25, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
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.

7 participants
0