[SOLVED] Change light bulb color temperature without changing power state

Greetings all,

This is probably not possible but I figured I would ask anyway. Would it be possible to update the color temperature of a light without changing the current power state ?

I currently have rules in place to adjust the color temperature of all my lights depending on the time of day. (Cooler during the day and warmer at night). However when the rules are run the update to the color temperature automatically turns on all of the lights that are updated…

My rules only make changes to the items that are linked to the color temperature channels of my lights and do not directly interact with any switch items.

I am using Philips Hue lights with a Philips Hue bridge, if that matters.

Not that I know of but you can be just a little bit clever in how you go about doing this.

For example, put your Items in a Group. Then when you want to change the color temp, filter the Group with just those Items that are already ON and only send the command to those.

Lights.members.filter[ l | l.getStateAs(OnOffType) == ON ].forEach[ l | l.sendCommand(newColorTemp) ]

You might need another Rule that triggers when a new light turns on to adjust it to the right color temp.

rule "Adjust color temp for newly on bulb"
when
    Member of Lights changed
then
    if(triggeringItem.getStateAs(OnOffType) == ON) triggeringItem.sendCommand(newColorTemp)
end

Note, the above are not complete Rules. I’ve skipped the calculation of newColorTemp.

4 Likes

This is genius !

Thank you !!!