Hi everyone, i’m tring to do my first script.
I’m creating a time field
time_start:
selector:
time: {}
name: Time start
description: "Inserisci il limite orario di inizio"
required: true
and i’m tring to use it in a condition based on time
if:
- condition: time
after: "{{ time_start }}"
before: "{{ time_end }}"
then:
- service: timer.start
metadata: {}
data: {}
target:
entity_id: "{{ timer_entity }}"
enabled: true
but i try to save the script i keep geting this error message:
Message malformed: Invalid time specified: {{ time_start }} for dictionary value @ data[‘sequence’][0][‘if’][0][‘after’]
This is all the script:
alias: "Timer: start timer on time condition"
sequence:
- if:
- condition: time
after: "{{ time_start }}"
before: "{{ time_end }}"
then:
- service: timer.start
metadata: {}
data: {}
target:
entity_id: "{{ timer_entity }}"
enabled: true
fields:
time_start:
selector:
time: {}
name: Time start
description: Inserisci il limite orario di inizio
required: true
time_end:
selector:
time: {}
description: Inserisci il limite orario di fine
name: Time end
required: true
timer_entity:
selector:
entity:
multiple: false
name: Timer entity
description: Entità del timer
required: true
description: Fa partire un timer se si trova in quell'intervallo di tempo
icon: mdi:clock-time-eight-outline
whot i’m doing wrong?