Closed zebaz closed 11 years ago
Thanks for this! :-)
I will include this feature in the next release tomorrow.
This requirement has been implemented in the following way: BlinkStick object has 2 new functions set_inverse(value) and get_inverse(). It either sets or gets inverse mode for the object and all functions adapt accordingly. This means that when you call set_color(name="red") it will correctly set it to red on IKEA DIODER modded with BlinkStick and get_color(color_format="hex") will return #ff0000 as the current color of BlinkStick. So the code example that should work for you is as follows:
stick = blinkstick.find_first()
stick.set_inverse(True)
stick.set_color(name="blue") # this correctly sets color to blue
New version of package will be released as soon as I finish testing.
Thanks for the speedy response, it works flawlessly!
Glad to hear it works for you :-)
LMK if you need anything else!
Hi,
First of all thanks for the great Python interface!
I'm using it to control my IKEA Dioder, and in my particular setup I need to reverse the colorcodes to make it work (so for a white color I need to send #00000 instead of #FFFFF).
This functionality is integrated in the Blinkstick Windows client, but I think it would be nice to integrate this as well in the Python bindings.
For now I've extended the Python script, and used an array to reverse the colorcodes like so (be warned, I'm coming from a Java background and still figuring out Python ;)):
This works without any issues, but it might be nice to integrate this in the library? Just a thought.