sl4m
(Simon)
June 13, 2023, 10:32am
1
Hello all,
i am using a HUE light with the available channels Color, Color_Temperature, Color_Temperature_abs, Alert and Effect.
No ON/OFF switch or brithness channel is available.
Now i want to check if my light is ON or OFF in a Blockly rule. But i am not able to do that.
In the state i am getting the HSB values. Can i somehow check the brithness (last value)? Or is there a better way?
2023-06-13 12:30:49.988 [ERROR] [org.openhab.rule.47c6897712 ] - ?
2023-06-13 12:30:50.004 [ERROR] [org.openhab.rule.47c6897712 ] - Pendellampe_unten_Farbe (Type=ColorItem, State=46,49,0, Label=Pendellampe unten , Category=ColorLight, Tags=[Control, Light], Groups=[Pendellampe_unten])
Thank you
Hamlet
(Hamid Shoja)
June 13, 2023, 11:06am
2
I had the same problem and solved it by asking if the last value of hsb is 0. maybe this helps:
Hello,
I would like to query the individual HSV (hue, saturation, value) values with blockly.
get state of item returns me e.g. 120,9,0
how can i query the individual values?
make list from text returns an error on the console:
Script execution of rule with UID '3421910b49' failed: TypeError: light_hsv.split is not a function in <eval> at line number 8
[image]
[image]
sl4m
(Simon)
June 13, 2023, 11:32am
3
Thank you! That very complicated to check if a light is on or off but it works
PS: i was searching 10 minutes for “create text with …”
1 Like
Matze0211
(Matthias)
June 13, 2023, 12:07pm
4
You should be able link switch and dimmer items to the color channel for on/off and brightness.
1 Like
sl4m
(Simon)
June 15, 2023, 4:45am
5
Thank you, thats a great solution!