Thank you so much OliM, I did my configuration based on yours.
Items
String ledstrip_scene {channel="miio:basic:04XXXXXX:actions#commands"}
Switch ledstrip_scene_tv "TV Scene" ["Lighting"]
Switch ledstrip_scene_movie "Movie Scene" ["Lighting"]
Switch ledstrip_power "TV Light" ["Lighting"] {channel="miio:basic:04XXXXXX:power"}
Rules
rule "TV Scene ON"
when
Item ledstrip_scene_tv received update ON
then
postUpdate(ledstrip_scene_movie,OFF)
postUpdate(ledstrip_power,ON)
sendCommand(ledstrip_scene, 'set_power["on", "smooth", 500, 1]')
sendCommand(ledstrip_scene, 'set_ct_abx[2505, "smooth", 500]')
sendCommand(ledstrip_scene, 'set_bright[100, "smooth", 500]')
end
rule "Movie Scene ON"
when
Item ledstrip_scene_movie received update ON
then
postUpdate(ledstrip_scene_tv,OFF)
postUpdate(ledstrip_power,ON)
sendCommand(ledstrip_scene, 'set_power["on", "smooth", 500, 2]')
sendCommand(ledstrip_scene, 'set_rgb(28671, "smooth", 500]')
sendCommand(ledstrip_scene, 'set_bright[80, "smooth", 500]')
end
rule "Scene OFF"
when
Item ledstrip_power received update OFF
then
postUpdate(ledstrip_scene_tv,OFF)
postUpdate(ledstrip_scene_movie,OFF)
end
I have used this document to know which commands I could use. Doc Yeelight
It is important to write “2” at the end in order to the ledstrip turns on in RGB mode.
sendCommand(ledstrip_scene, ‘set_power[“on”, “smooth”, 500, 2]’)
If you use “1”, it turns on in warm and cool color mode (CT).
sendCommand(ledstrip_scene, ‘set_power[“on”, “smooth”, 500, 1]’)