Hi,
Sorry for this noob question, i’m strugling how to configure the formal parameters of a automation script.
This is what I have:
script:
alias: set Cover X at position Y
fields:
X:
description: The cover
type: entity_id
target_position:
description: The requested position
type: integer
sequence:
# get the current position
- service: cover.get_position
entity_id: "{{ X }}"
data:
# get the current value of `position`
position: &position "{{ value }}"
# Set the position of the cover
- service: cover.set_position
entity_id: "{{ X }}"
position: "{{ target_position }}"
# wait till position is reached (wifi problems, electricity problems,...)
- while:
condition:
# Check the requested position
condition: numeric_state
entity_id: "{{ X }}"
attribute: position
below: "{{ target_position }}"
above: "{{ target_position }}"
action:
# Set the position of the cover
service: cover.set_position
entity_id: "{{ X }}"
# Wait 5 seconds
delay: 00:00:05
The only thing I get is an error when I try to save the automation script:
Message malformed: extra keys not allowed @ data[‘fields’][‘X’][‘type’]
I’ll find several solutions and they are all different. I used bard.google.com but it was so helpfull to say that I had to post the question here.