There must be an easier way to do this…
I have the following effect in ESPhome:
(I used the light.addressable_set
to make sure it runs only once)
The led (ring) fills and empties all leds.
Would it be possible to template this or create a ‘for’ loop or something like that?
on_...
- light.addressable_set:
id: activity_led
range_from: 0
range_to: 0
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 1
range_to: 1
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 2
range_to: 2
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 3
range_to: 3
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 4
range_to: 4
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 5
range_to: 5
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 6
range_to: 6
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 7
range_to: 7
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 8
range_to: 8
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 9
range_to: 9
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 10
range_to: 10
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 11
range_to: 11
red: 100%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 0
range_to: 0
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 1
range_to: 1
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 2
range_to: 2
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 3
range_to: 3
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 4
range_to: 4
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 5
range_to: 5
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 6
range_to: 6
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 7
range_to: 7
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 8
range_to: 8
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 9
range_to: 9
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 10
range_to: 10
red: 0%
green: 0%
blue: 0%
- delay: 50ms
- light.addressable_set:
id: activity_led
range_from: 11
range_to: 11
red: 0%
green: 0%
blue: 0%