Hi all. My BlinkStick Flex just arrived, and I was wondering how can I program it properly in Python.
For instance, I already have a Python script which now works with a Xiaomi Yeelight bulb, which turns on the light on sunset and closes the light on sunrise. I want to adapt this script to work with the BlinkStick Flex as well, and I haven’t really figured out how it should work.
For instance, if I want to open entire strip, I would use the following piece of code:
from blinkstick import blinkstick bstick = blinkstick.find_first() x=0 while x < 32: bstick.set_color(channel=0, index=x, name="red") x+=1
And if I want to close the light, I would use the following:
for bstick in blinkstick.find_all(): bstick.turn_off()
However, this code only closes the first led in the strip and does not shut down the entire strip, as I would want.
My Python knowledge is somehow limited, and these codes are not written by myself, but they were listed here in this forum.
Is there any other way to just power on/off the entire strip without using the while/for statements? And what code I should be using in order to power off the entire strip and not only the first one?
Any help will be appreciated.