Hi, I have been struggling with this one for a while and I can’t see what my error is:
This script raises the extra keys not allowed @data[‘script’] error
script:
notify_lawn_status:
alias: Notify Lawn Status
sequence:
- service: notify.notify
data:
message: >
{% if states('input_boolean.mow_lawn') == "on" %}
It's time to mow the lawn! No rain in the last 6 hours.
Last rain reported at {{ states('input_datetime.time_of_last_reported_rainfall') }}
{% else %}
Hold off on mowing. Rain reported within the last 6 hours.
Last rain reported at {{ states('input_datetime.time_of_last_reported_rainfall') }}
{% endif %}
So does the one below - but below is the example from Templating - Home Assistant. This is in the script editor in YAML mode.
script:
msg_who_is_home:
sequence:
- service: notify.notify
data:
message: >
{% if is_state('device_tracker.paulus', 'home') %}
Ha, Paulus is home!
{% else %}
Paulus is at {{ states('device_tracker.paulus') }}.
{% endif %}
It’s going to be something dumb but I just can’t see it. The input.datetime and input_boolean devices do exist in my setup.
Thanks in advance for help!