I tried to put the example that appears in “Script Syntax” docs, and .log returns me this error in Scripts.yaml : “[wait_for_trigger] is an invalid option for [script].”
new:
alias: "Wait for MY_EVENT or light on"
wait_for_trigger:
- platform: event
event_type: MY_EVENT
- platform: state
entity_id: light.LIGHT
to: "on"
for: 10
# Example script integration containing script syntax
script:
example_script:
sequence:
# This is written using the Script Syntax
- alias: "Turn on ceiling light"
service: light.turn_on
target:
entity_id: light.ceiling
.
.
You’re using an ancient version of Home Assistant. It doesn’t support target or wait_for_trigger.
The documentation always represents what can be done with the latest version of Home Assistant. Unless you upgrade, you will continually encounter the problem of your system failing to support functionality described in the documentation.
EDIT
wait_for_trigger was introduced in version 0.115 in September 2020.
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions. For more information, refer to guideline 21 in the FAQ.