Hi I have been writing a script to change the color of a LIFX light and it is having unexpected results. The script is intended to gradually change the red setting of RGB.
It is setting the red value to a constant 255. The log service is logging the expected value and is incrementing as the script loops.
Here is the script:
transition_red:
fields:
light_id:
description: The light to be transitioned
sequence:
- repeat:
count: '255'
sequence:
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 1000
- service: counter.increment
target:
entity_id: counter.red_value_counter
- service: system_log.write
data:
message: 'Repeat Value: {{ repeat.index }}'
level: info
- service: light.turn_on
data:
rgb_color:
- '{{repeat.index}}'
- 0
- 0
target:
entity_id: light.uplight1
mode: single
alias: Transition Red