[SOLVED] Change function of color picker item

I`m using the colorpicker item along with my ledstripes.

the button up and down switches the lights on and off. but instead of really power on/off they just send a color value (eg. 0,0,0 for power off). problem is that I have an external wall-switch which should also power on/off the lights but this doesn`t work when power is already on and color is 0,0,0.
yes, I know I could use another item for power on/off but if I could have my UI small would be nice. my wife stumples over this issue and I need to raise the WAF…
has someone an idea how to change the colorpicker item and change the button up/down to power on/off?

Unfortunately I don’t think you can.


You can use a rule:

rule "wall switch"
    Item WallSwitch received command
   if (LEDStrip.state == OFF) LEDStrip.state.sendCommand(ON) else LEDStrip.state.sendCommand(ON)

my statement that the colorpicker sends a color of 0,0,0 was wrong! the colorpicker buttons send ON or OFF

LED_Bad_Color changed from ON to OFF

I was gathering MQTT info back from the led strip and that reported a color 0,0,0. sure, it was switched OFF :see_no_evil:

so if anybody is interested in the config for magichome LED controller that is flashed with tasmota firmware:

Switch LED_Bad "LEDlicht Bad [MAP(OnOff.map):%s]" <light> [ "Switchable" ] { mqtt=">[broker:cmnd/LED_Bad/POWER:command:*:default], 
String LED_Bad_Color   "LED Licht"                    {mqtt="<[broker:tele/LED_Bad/STATE:state:JSONPATH($.HSBColor)],

and the rule:

rule "switch off led controller"       

        Item LED_Bad_Color received command

            if ( LED_Bad_Color.state.toString.contains("OFF")) sendCommand(LED_Bad,OFF)
            else sendCommand(LED_Bad,ON)

1 Like