Good morning,
I’m having a problem with the syntax of a script.
I copied the command lines that work in configuration.yaml into a script, and I got errors.
Can you help me correct the syntax in the script?
THANKS
…
configuration.yaml:
rest:
- resource: “http://192.168.0.250:80/api/xdevices.json?key=apikey&Get=all”
binary_sensor:- name: “value D1”
value_template: ‘{% if value_json[“D1”] is defined %}
{{ value_json[“D1”] }}
{% endif %}’
…
…
script:
Message malformed: extra keys not allowed @ data[‘rest’]
- name: “value D1”
alias: Test json to binary_sensor
sequence:
rest:
- resource: “http://192.168.0.250:80/api/xdevices.json?key=apikey&Get=all”
binary_sensor:- name: “value D1”
value_template: ‘{% if value_json[“D1”] is defined %}
{{ value_json[“D1”] }}
{% endif %}’
mode: single
…
- name: “value D1”