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?