Skip to content

Added support for moonlight mode

Jakub requested to merge jakubs/python-yeelight:moonlight-mode into master

The Yeelight ceiling lights have a feature called moonlight which allows the light to be switched to a mode with a warm temperature and a significantly lower brightness than is achievable in the normal. I have implemented support for this feature using the set_power method. This method accepts an additional argument (not documented in the official API documentation) which specifies the state of the light when powering on. It can be either the last state, normal state or moonlight state.

This implementation allows the state to be passed to turn_on as power_on_state.

There are also shorthand methods enable_moonlight and disable_moonlight that allow switching between the standard mode and the moonlight mode.

Merge request reports