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

Really post rgbw-colour #30

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Really post rgbw-colour #30

merged 1 commit into from
Sep 22, 2023

Conversation

Olen
Copy link
Contributor

@Olen Olen commented Sep 22, 2023

It looks like you forgot to include "white" in the set_static_colour-function to actually be able to send rgbw-colours.

Also added at check to see if the device actually supports RGBW before submitting the colour.
It is very crude, and just set white to None if a RGBW-colour is to be sent to a RGB-only Twinkly. It might not give the expected colour if the wrong format is used, but it should at least not confuse the Twinkly.
The user should probably check the new functions is_rgb and is_rgbw before manipulating the colours anyway.

We could add something like https://github.com/iamh2o/rgbw_colorspace_converter/ to ensure proper conversion between colorspaces, but I think it is out of the scope at least for now.

@jschlyter jschlyter self-assigned this Sep 22, 2023
@jschlyter jschlyter merged commit d8cc697 into jschlyter:main Sep 22, 2023
3 checks passed
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.

2 participants