Hello everyone,
I’m currently working on a YAML script for Home Assistant but have encountered an error that I can’t seem to resolve. I would greatly appreciate it if someone could help me identify and fix the issue.
I always get the Message malformed: extra keys not allowed @ data[‘trigger’]?
alias: "Sends stop command to roller blinds"
description: "stops roller blinds after time delay"
fields:
entity_id:
description: "Entity-ID of Blind"
example: "cover.rl_mqtt_cover"
time_in_seconds:
description: "time delay"
example: 23
variables:
entity_id: "{{ entity_id }}"
time_in_seconds: "{{ time_in_seconds }}"
trigger:
- platform: state
entity_id: "{{ entity_id }}"
to: opening
for:
seconds: "{{ time_in_seconds }}"
- platform: state
entity_id: "{{ entity_id }}"
to: closing
for:
seconds: "{{ time_in_seconds }}"
action:
- service: cover.stop_cover
target:
entity_id: "{{ entity_id }}"
mode: single