Extension of the original Python script for controlling Yeelight bulbs, and ESP8266 code (Arduino IDE) for a control device that changes scenes with physical buttons.
Yeelight has a webpage for developers and a handy inter-operation specification document
I added 3 pre-defined scenes that I use (called low
, mid
, and full_fire
) as well as a shut-off command
The script is made for an ESP8266 NodeMCU board with 4 buttons attached to it (pin-~-ground). 3 buttons trigger the 3 predefined scenes and 4th one turns the light off. The main loop could be written more efficiently (lots of repetitive code), but it is a rework of an older project and not worth my time.