Error in script syntax

hi,

i cannot find my error in the following script config.
script:
- motion_az_on:
alias: “Turn on lamp and set timer”
sequence:
- service: script.turn_off
data:
entity_id: script.motion_az_off
- service: light.turn_on
data:
entity_id: light.schreibtisch_christian
- service: script.turn_on
data:
entity_id: script.motion_az_off

- motion_az_off:
    alias: "Turn off lamp after 10 minutes"
    sequence:
      - delay:
          minutes: 5
      - service: light.turn_off
        data:
          entity_id: light.schreibtisch_christian

May u find the error. checked with an yaml parser but no structrual errors. Got following error message at config validation:

hass --script check_config
Testing configuration at /home/htpc/.homeassistant
16-10-24 17:25:25 ERROR (Thread-1) [homeassistant.bootstrap] The following platforms contain invalid configuration: script (please check your configuration)expected a dictionary for dictionary value @ data[‘script’]. Got [[OrderedDict([(‘motion_az_on’, OrderedDict([(‘alias’, ‘Turn on lamp and set timer’), (‘sequence’, [OrderedDict([(‘service’, ‘script.turn_off’), (‘data’, OrderedDict([(‘entity_id’, ‘script.motion_az_off’)]))]), OrderedDict([(‘service’, ‘light.turn_on’), (‘data’, OrderedDict([(‘entity_id’, ‘light.schreibtisch_christian’)]))]), OrderedDict([(‘service’, ‘script.turn_on’), (‘data’, OrderedDict([(‘entity_id’, ‘script.motion_az_off’)]))])])]))]), OrderedDict([(‘motion_az_off’, OrderedDict([(‘alias’… Please check the docs at Scripts - Home Assistant
Failed config
script:
- [OrderedDict([(‘motion_az_on’, OrderedDict([(‘alias’, ‘Turn on lamp and set timer’), (‘sequence’, [OrderedDict([(‘service’, ‘script.turn_off’), (‘data’, OrderedDict([(‘entity_id’, ‘script.motion_az_off’)]))]), OrderedDict([(‘service’, ‘light.turn_on’), (‘data’, OrderedDict([(‘entity_id’, ‘light.schreibtisch_christian’)]))]), OrderedDict([(‘service’, ‘script.turn_on’), (‘data’, OrderedDict([(‘entity_id’, ‘script.motion_az_off’)]))])])]))]), OrderedDict([(‘motion_az_off’, OrderedDict([(‘alias’, ‘Turn off lamp after 10 minutes’), (‘sequence’, [OrderedDict([(‘delay’, OrderedDict([(‘minutes’, 5)]))]), OrderedDict([(‘service’, ‘light.turn_off’), (‘data’, OrderedDict([(‘entity_id’, ‘light.schreibtisch_christian’)]))])])]))])]

Successful config (partial)
script:

Hey @teqqy

There should not be a hyphen in front of the script name. Try this…

# turn off lamp after 10 minutes
motion_az_off:
  sequence:
    - delay:
        minutes: 5
    - service: light.turn_off
      data:
        entity_id: light.schreibtisch_christian

Are you using a scripts.yaml file or are you putting everything in the configuration.yaml?

Thx. Now it works.