[SOLVED] Match WIFI LED Color to Hue Color

Hey Guys,

Looking for a little help on an idea I had to match colors from hue light to a WIFI Led light.

Basically looking for the functionality below, but cant get it working:

rule "Basement Lights Colors"
    when
        Item Basement_color received command
    then
       
       if (receivedCommand == "0,100,100") {
            Speaker_LEDS.sendCommand(0,100,100)
            }

    end

Is this achievable or too much?

Thanks in advance :slight_smile:

The conditional statement requires an item or variable.
Example

when
    Item Basement_color received command
then
   
   if (Basement_color.state as Number == "0,100,100") {
        Speaker_LEDS.sendCommand(0,100,100)
        }

end

I followed your example, I dont see any change, and no command sent to Speaker LEDS in the events.log Do I need to define the variable first?

I was only pointing out that the “if” statement would not work as posted. I’ve never used color bulbs so I can’t help much with that part but listing the Speaker_LED item type might help others who are familiar with color bulbs.

The item type is color. I set it up in paper UI

To use file base rules you will need to create your items in files.

For using a rule with color bulbs here’s a good place to begin.

Be sure to read the other 5 post below as the last one has additional links.

Thanks. I figured it out with that link:

Here is the code:

rule "huefollow"

when
    Item BasementWhiteLampColor received update or Item BasementWhiteLampColor changed or Item BasementWhiteLampColor received command
then
    SpeakerLEDsColor.sendCommand(BasementWhiteLampColor.state.toString)
end

:slight_smile:

Glad I could assist with forum searching.:joy: