Howto set color of Color switch, RGBWW, Dimmer from Python?
Posted: Sunday 21 October 2018 14:25
I can control Yeelight color bulb from Domoticz web UI using "Color switch, RGBWW, Dimmer."
But I want to control this from the Python.
I can turn on/off the bulb and change its brighness:
The code works and print in log:
But how to change the bulb's color? Desirable without sending HTTP requests.
I can change color via the web interface, so I believe there must be the way do this via DE.Command('Bulb 1', '...') but which command should be there?
But I want to control this from the Python.
I can turn on/off the bulb and change its brighness:
Code: Select all
import DomoticzEvents as DE
device = DE.changed_device
if device.name == "Xiaomi Wireless Switch":
DE.Log(DE.Devices["Bulb 1"].Describe())
DE.Command('Bulb 1', 'On')
DE.Command('Bulb 1', 'Set Level 100 AFTER 0')
Code: Select all
ID: 1 Name: Bulb 1, Type: 241, subType: 4, switchType: 7, s_value: 24, n_value: 1, n_value_string: On, last_update_string: 2
I can change color via the web interface, so I believe there must be the way do this via DE.Command('Bulb 1', '...') but which command should be there?