alias: deactivate lamp at 06.30, if the color is blue
trigger:
- platform: time
at: ‘06:30:00’
condition:
- condition: state
entity_id: light.kokken_bord_lampe_hojre
state: ‘on’
attribute: rgb_color
value: [0, 0, 255]
action:
- service: light.turn_off
entity_id: light.light.kokken_bord_lampe_hojre
Hi Rofo.
I can see that the color not is 100% blue. it is [11, 0, 255] . I have change the color in the script, but still nothing happens.
I cant see any fault in the automation log
Thats one way of doing it. But thats not really the solution. You are just checking if the RGB Blue component is set to 255, and ignoring the rest, which means white (for example, which is 255,255,255 would also trigger it.
Infact any colour that also uses the full blue channel will trigger it.
If you checked the automation trace history it would have told you why the original failed to fire. I suspect its still something to do with how you set the colour.
FYI, you can set the colour to exact values (not using the colour wheel) by using the pencil icon next to the colour wheel.