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

Moonlight: Fix parameters of the set_rgb api call #435

Merged

Conversation

syssi
Copy link
Collaborator

@syssi syssi commented Dec 12, 2018

@coveralls
Copy link

coveralls commented Dec 12, 2018

Coverage Status

Coverage remained the same at 72.632% when pulling 3a1547a on syssi:feature/fix-philips-moonlight-color-support into 2e63681 on rytilahti:master.

@@ -241,7 +241,9 @@ def set_brightness_and_rgb(self, brightness: int, rgb: Tuple[int, int, int]):
if color < 0 or color > 255:
raise PhilipsMoonlightException("Invalid color: %s" % color)

return self.send("set_brirgb", [brightness, rgb_to_int(rgb)])
params = list(rgb)
params.append(brightness)
Copy link
Owner

Choose a reason for hiding this comment

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

I think [brightness, *rgb] would also work here, but this is fine to me, so feel free to merge as you wish.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep. Work like a charm!

@syssi syssi merged commit 6db862d into rytilahti:master Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants