I have created a basic script in Python using the LifxLAN library. This simply cycles the color of my lights. The script uses a
for loop to set the colors saved in a list using
set_color(color, [duration], [rapid]). I run this script in the background through the terminal on a Mac.
Sometimes, I would like to override on-the-fly the original brightness levels. I can in fact do this by running Python in the terminal (while the script runs in the background) and setting the desired brightness level using
set_brightness(brightness, [duration], [rapid]) .
The problem with this approach is that in the next iteration of the
for loop the brightness reverts back to the value specified originally. Is there a way to prevent this from happening?
I am asking because if I set the brightness for a bulb (or group of bulbs) in the LIFX app on iOS and then animate a theme, if I change the brightness again while the animation is running this does not revert back to the one specified originally.