Day 3 of my openHAB voyage .
I have created switches for my HUE lights, but the builtin power switches come with a disadvantage (for me).
The switch turns on the lights with the same color as they were turned off.
I need them to be switched in a predefined color, so I guess I will be needing a script then???
Can someone point me in the right direction on where and how to build a script?
And perhaps does anyone have a sample code to manipulate the color and state of HUE lights?
var HSBType Blacklight = new HSBType(new DecimalType(63),new PercentType(3),new PercentType(0)) // Black 100%
var HSBType Redlight50 = new HSBType(new DecimalType(7),new PercentType(100),new PercentType(50)) // Scarlet Red 50%
var HSBType Redlight = new HSBType(new DecimalType(7),new PercentType(100),new PercentType(100)) // Scarlet Red 100%
var HSBType Orangelight50 = new HSBType(new DecimalType(39),new PercentType(87),new PercentType(100)) // Dark Tangerine 50%
var HSBType Orangelight = new HSBType(new DecimalType(39),new PercentType(87),new PercentType(100)) // Dark Tangerine 100%
var HSBType Whitelight50 = new HSBType(new DecimalType(0),new PercentType(0),new PercentType(50)) // White 50%
var HSBType Whitelight = new HSBType(new DecimalType(0),new PercentType(0),new PercentType(100)) // White 100%
var HSBType Bluelight = new HSBType(new DecimalType(234),new PercentType(87),new PercentType(100)) // Blue 100%
var HSBType DarkOrangelight = new HSBType(new DecimalType(32),new PercentType(100),new PercentType(100)) // Dark Orange 100% (Halloween)
var HSBType Purplelight = new HSBType(new DecimalType(300),new PercentType(100),new PercentType(50)) // Purple 100%
This works, but I would like to understand @jwiseman solution as well.
I can’t seem to find anything that looks like your code?
Where should I put your code?