Updating Color of RGB color switch
Posted: Monday 25 May 2020 23:36
I would like to update the color of my RGB color switch.
if I use the code below nothing happens.
Both Log output doesn't show any Color has been set.
Could someone explain what I've done wrong.
The device it is used for is created in this way:
I hope that someone can help me with this.
if I use the code below nothing happens.
Both Log output doesn't show any Color has been set.
Could someone explain what I've done wrong.
Code: Select all
color = json.dumps({
'ColorMode': 3, #mode 3: RGB
'r': 200,
'g': 255,
'b': 100
})
Domoticz.Log(str(Devices[Unit].Color))
Devices[Unit].Update(nValue=1,sValue="1", Color=str(color))
Domoticz.Log(str(Devices[Unit].Color))Code: Select all
Domoticz.Device(Name="RGBW", Unit=1, Used=1, Type=241, Subtype=1).Create()