Apologies in advance for this no doubt noob question.
I have Shelly devices installed and would like to use a HA automation to cycle through some preset colours of my Shelly RGBW lights from a Shelly i3 switch.
I have set visual editor automations to use button combinations (1 click, 2 click, 3 click) to change them to Red, Green, Blue, but would like to use just a single click to cycle through these options instead.
I think I need to use a Helper and input_select but really not sure how to implement this. Have tried researching but haven’t seen anything that helps me yet.
I would like to be able to use the Visual Editor in automations if possible. Is this possible?
Hope you don’t mind reviving this topic. Ever have any luck with this @SuperChick3n ? I’m trying to do a similiar thing with a button. I’d like to tap a single that will cycle through multiple colors. Right now I’m using a script and a bunch of IF statements, but I can’t seem to get the color to be used as a condition. Automation triggers the script when the button is pressed.
I’ve tried the below script as well as nesting the IF statements, but can’t get passed the initial action. Lights turn on and set to orange, but will not change on the next run. Seems like I’m setting my RGB attribute and color incorrectly?
alias: Cabinet Lights test
sequence:
- alias: If
if:
- condition: state
entity_id: light.cabinet_lights
state: "off"
alias: If Cabinet Lights are off...
then:
- alias: Set to Orange
service: light.turn_on
target:
entity_id: light.cabinet_lights
data:
rgb_color:
- 255
- 147
- 0
else: []
- alias: If
if:
- alias: If they're Orange...
condition: state
entity_id: light.cabinet_lights
attribute: rgb_color
state: 255, 147, 0
then:
- alias: Set to Blue
service: light.turn_on
target:
entity_id: light.cabinet_lights
data:
rgb_color:
- 0
- 253
- 255
effect: colorloop
else: []
- alias: If
if:
- alias: If they're Blue...
condition: state
entity_id: light.cabinet_lights
attribute: rgb_color
state: 0, 252, 255
then:
- alias: Set to Purple
service: light.turn_on
target:
entity_id: light.cabinet_lights
data:
rgb_color:
- 211
- 87
- 254
else: []
- alias: If
if:
- alias: If they're Purple...
condition: state
entity_id: light.cabinet_lights
attribute: rgb_color
state: 212, 91, 255
then:
- service: light.turn_off
target:
entity_id: light.cabinet_lights
data: {}
alias: Turn them off
else:
- alias: Set to Orange
service: light.turn_on
target:
entity_id: light.cabinet_lights
data:
rgb_color:
- 255
- 147
- 0
mode: single
icon: mdi:led-strip
Sorry to nudge this. Curious if anyone has had success on cycling through colors using a single trigger. Is the best way to to this to use an RGB color as a condition?
I believe some has, using i.e input-select and automation
Here is a start, if not sufficient info, you can always try the search function, the more you use search-functions on the web, the better you get to “narrow down” your search words etc.
In your case you already have the right words.