How to combine commands

Hello everyone. I have made software in Python to control Yeelight Color. I read the PDF documentation. The problem is how do I turn on the bulb with some parameters?

I can turn it off smothly (i.e. slowly in 3 seconds) but hen I turn it on, I can either issue command:

set_power (on, smooth) and it will turn on in LAST used color and intensity.

but I want it to turn on at intensity i.e. 50 and SMOOTHly and color BLUE (and previously it was i.e. RED)

I can then do “set_rgb” and “set_bright” but that would be in 3 steps and it wouldn’t at once turn on in blue and at desired intensity, but rather turn smoothly to previous state an THEN change color and intensity…

Any way to do it all at once, programatically?

Thanx!

Please check out “set_scene” command in the spec.

Thanx! Almost exactly what I needed - I set color and intensity (brightness) to 1 with set_scene, and then immediately set brightness to 100% with set_bright and “smooth” parameter :slight_smile: