I’ve got a few SmartThings buttons and I’ve got some SmartLife bulbs that I’m working with.
I set up 3 input_select
lists with the RGB values that I’d like to cycle through.
In my configuration.yaml
:
input_select:
red_color:
options:
- 255
- 255
- 255
- 239
- 119
- 70
- 0
- 0
- 0
- 255
green_color:
options:
- 239
- 96
- 71
- 70
- 70
- 144
- 255
- 255
- 255
- 174
blue_color:
options:
- 72
- 71
- 129
- 255
- 255
- 255
- 255
- 106
- 0
- 0
I setup an automation to use the button triggers and cycle through the RGB values from these lists.
- id: '1642148439200'
alias: Lights Control (Automation)
description: ''
trigger:
- platform: state
entity_id: sensor.button_click
to: double
id: double
condition: []
action:
- service: light.turn_on
target:
entity_id: light.lamp
data:
rgb_color:
- '{{ states(''input_select.red_color'') }}'
- '{{ states(''input_select.green_color'') }}'
- '{{ states(''input_select.blue_color'') }}'
- service: input_select.select_next
target:
entity_id:
- input_select.red_color
- input_select.green_color
- input_select.blue_color
mode: single
Everything works perfectly fine when the lists only have a max of 3 values - it will cycle through 1 - 3 for as many times as the buttons are pressed. Anything beyond 3, it will get stuck on the 4th option.
Even if I manually change the bulb colour and then I try use the automation again, it starts by the 4th option but at the same time won’t go through the next options.
I have tried switching the order of the RGB values, I have tried a normal list with colour names instead of RGB values, but still get the same behaviour.
I have also since moved this automation to a script (to do a bit more logic) but even in the script, it behaves the same.
There’s no errors on the log output so I don’t even know where to begin to debug.