Issue configuring automation for yale smart alarm

Hello

I am brand new to this! I want to set up an automation for my Yale alarm to disarm once the Yale door handle is unlocked. I have written the yaml as best I can, however, it is still giving me the error message Error loading /config/configuration.yaml: while parsing a block collection
in “/config/automations.yaml”, line 1, column 1
expected , but found ‘?’
in “/config/automations.yaml”, line 2, column 1

Please can someone tell me what I’m doing wrong? Code is below.

Many thanks in advance!

- alias: Alarm disarm when door unlocked

description: Disarm the alarm once the door handle is unlocked

mode: single

trigger:

- platform: state

entity_id: lock.yale_door_lock

from: 'locked'

to: 'unlocked'

condition:

  - condition: state

  entity_id: alarm_control_panel.yale_smart_alarm

  state: 'armed_away'

action:

  service: alarm_disarm

  entity_id: alarm_control_panel.yale_smart_alarm
```Preformatted text

Your formatting looks wrong to me, this is how my automations look …

- alias: Janet Update Available
  trigger:
    - platform: state
      entity_id: sensor.up_to_date
      from: "true"
      to: "false"
  action:
    - service: script.janet_speech_engine
      data:
        call_greeting: 1
        call_update: 1
  id: Janet Update Available

Check your left spaces (everything should be indented 2 spaces) and that you don’t have any tabs.