Page 1 of 1

Setting Color in a python script

Posted: Monday 15 November 2021 16:59
by pipiche
Hello,

I'm writing a python script by using the i"mport DomoticzEvents" statement to interact with the Domoticz commands and variable.
However I didn't find the way to set Light Colors.

here after is the python3 script store in scripts/python

Code: Select all

import DomoticzEvents as Dz
Dz.Command( "Led #1 Bureau", 'On FOR 10')
I would like to set at the same time the color of the Led, how can I do that ? Color like "{ bri: 100, color: '{m: 2, RGB: 000000, CWWW: 05fa, CT: 250}"

Re: Setting Color in a python script

Posted: Monday 15 November 2021 21:18
by waltervl
As this python scripting is hardly documented I would advise you to switch to dzVents. Also better integrated into Domoticz database. https://www.domoticz.com/wiki/DzVents:_ ... _scripting

Other possibility is to create a Python Plugin: https://www.domoticz.com/wiki/Developin ... hon_plugin