I`m trying to turn on WLED light with random effect selected everytime it turns on.
this script is not working for me. any idea why?
action:
- service: light.turn_on
entity_id: light.wled_2
data:
effect: random
I`m trying to turn on WLED light with random effect selected everytime it turns on.
this script is not working for me. any idea why?
action:
- service: light.turn_on
entity_id: light.wled_2
data:
effect: random
i haven’t been able to figure this out either. If I make any progress ill let you know
Hello, I was able to get this to work with the following:
wled1_random_effect:
alias: Cabinet random effect
sequence:
- service: light.turn_on
data:
entity_id: light.wled1
rgb_color: ['{{ (range(0, 255)|random) }}',
'{{ (range(0, 255)|random) }}',
'{{ (range(0, 255)|random) }}']
- entity_id: light.wled1
service: wled.effect
data:
effect: '{{ state_attr("light.wled1", "effect_list") | random }}'
intensity: '{{ (range(50, 200)|random) }}'
speed: '{{ (range(50, 200)|random) }}'