hi
trying to create a variable using attribute of an entity passed as a variable to the script:
wled_turn_on_via_effect:
description: "turn WLED on via an effect"
fields:
entity:
description: "WLED entity"
example: light.wled
variables:
old_speed: {{ state_attr(entity, 'speed') }}
getting:
missed comma between flow collection entries at line 15, column 49:
... d: {{ state_attr(entity, 'speed') }}
^
if I try to access as
old_speed: {{ states(entity.speed) }}
or
old_speed: '{{ entity.speed }}'
I get a null value later on when casting to int in script’s sequence:
- service: wled.effect
target:
entity_id: "{{ entity }}"
data:
effect: 'Candy Cane'
speed: "{{ old_speed | int }}"