Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andis_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.