So I got this error while modifying an automation…
Now I can’t seem to get rid of it…Below is a snap of my automation.
Does anyone have a clue what I’ve missed?
As code:
action:
- service: cover.set_cover_position
data:
position: |
{% if trigger.idx == '0' && state_attr('sun.sun', 'elevation') > 10 &&
states('sensor.bathroom_lumi_illuminance') > 1465 &&
states('sensor.outdoor') > 15 %}
50
{% elif trigger.idx == '1' && state_attr('sun.sun', 'azimuth') > 290 %}
100
{% else %}
{{ state_attr('cover.bathroom_blind_position', 'current_position') }}
{% endif %}
target: