I realy like the Yeelight Ceiling and its Moonlight mode. I dim and adjust color by home-assistant. Now i wonder if it is possible to enable the Moonlight mode with the API as well. Right now i only saw the possibility to enable it with remote or cell phone. In the developer PDF is saw nothing about Moonlight.
If the client keeps track of the Ceiling’s brightness and color temperature info, it could achieve this by set_ct_abx interface. But I assume this is untrue for your case.
There’s an extra parameter “mode” for set_power interface though, which can be used to switch to specific mode regardless of current power status.
Example 1: switch or turn on the light to last mode:
{“method”:“set_power”,“params”:[“on”, “smooth”, 500, 0]}
Example 2: switch or turn on the light to normal mode:
{“method”:“set_power”,“params”:[“on”, “smooth”, 500, 1]}
Example 2: switch or turn on the light to nightlight mode:
{“method”:“set_power”,“params”:[“on”, “smooth”, 500, 5]}
Note this interface requires/allows no brightness or color information.
Other values for mode (not supported by Yeelight Ceiling):
2: switch to RGB mode
3: switch to HSV mode
4. switch to color flow mode