I am attempting to create an automation in HA targeting the inovelli LZW42 Multi-colored bulb. If the light is green (rgb30,255,60) then it should turn red (rgb 255, 7, 0). Unfortunately, the state condition doesn’t recognize the bulb’s RGB Color attribute. I’ve tried using various forms of the attribute text including: “255, 7, 0”, ‘255, 7, 0’ exactly, ‘255, 7, 0’ without the quotes, rgb(255, 7, 0), and (255, 7, 0). I’ve also tried using the Hs Color attribute, with the same result. The third path condition is always followed indicating that the state doesn’t match anything I’ve suggested, even though the notification shows (255, 7, 0).
As clarification, the changing of the colors is done through scenes and they work. I have verified that the RGB colors are the ones the scenes are switching to using the dev tools.
For reference, here is the YAML for this automation. I know that there isn’t a trigger; that’s intentional right now. I’m manually triggering it with the run command until I get it working the way I want. The automation is running because I always get the notification on my phone.
alias: Toggle Busy/Not Busy Automation
description: ""
trigger: []
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: light.multi_color_bulb
attribute: rgb_color
state: 30, 255, 60
sequence:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.busy
- conditions:
- condition: state
entity_id: light.multi_color_bulb
state: (255, 7, 0)
attribute: rgb_color
sequence:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.not_busy
- conditions:
- condition: not
conditions:
- condition: state
entity_id: light.multi_color_bulb
attribute: rgb_color
state: 30, 255, 60
- condition: state
entity_id: light.multi_color_bulb
attribute: rgb_color
state: (255, 7, 0)
sequence:
- service: notify.mobile_app_thomas_phone
metadata: {}
data:
message: >-
RGB value is not known {{ state_attr("light.multi_color_bulb",
"rgb_color") }}
mode: single