[SOLVED] Using send command and open hab LIFX binding to change colour

I have been searching for a few hours now and haven’t found an answer so any help would be amazing
I am trying to add a LIFX light to a night light switch I have in my openhab system, it basically sets lights to about 25% and blue for 5 minutes when turned on, and we trigger it from around the house to EG go to the loo

I have managed to turn on and set the LIFX bulb’s intensity to 35%
" LIFxB001_Color.sendCommand(ON)
LIFxB001_Color.sendCommand(25) "
but can’t figure out how to use a .sendCommand(???) to set the colour

i am using the LIFX Binding inside openhab in version 2.3.0-1 (every time I try to upgrade Mosquito/MQTT stops working, but that’s another issue)

// LIFX Lights
//–Lounge Room Lamp B001
Color LIFxB001_Color { channel=“lifx:colorlight:LIFxB001:color” }
Dimmer LIFxB001_Temperature { channel=“lifx:colorlight:LIFxB001:temperature” }
Number LIFxB001_SignalStrength { channel=“lifx:colorlight:LIFxB001:signalstrength” }

I do that using HSBType commands like this:

Light_Color.sendCommand(new HSBType("0,100,40") as Command)

You might need to add an import for the Command:

import org.eclipse.smarthome.core.types.Command

You are a legend
thank you very much

1 Like