Alarmo and script issue

Hi all,

I’m trying to get a script working that Alarmo will activate when triggered. The script will repeat an alarm sound until Alarmo is disarmed. That’s working fine.
When I try to add the functionality that the alarm will be automatically stopped after 30 minutes I get an error. I cannot determine what I’m doing wrong.

alias: Sirene
sequence:
  - service: media_player.volume_set  # Set volume to 1
    data:
      volume_level: 1
    target:
      entity_id: media_player.roam
  - service: media_player.play_media  # Play alarm sound
    target:
      entity_id: media_player.roam
    data:
      media_content_id: media-source://media_source/local/burglar-alert-1656.wav
      media_content_type: audio/x-wav
  - parallel:  # Run these actions simultaneously
    - delay: 00:30:00  # Wait for 30 minutes
    - wait_for_trigger:  # Wait for alarm disarm
      platform: state
      entity_id: alarm_control_panel.alarmo
      to: disarmed
  - service: media_player.turn_off  # Turn off siren
    target:
      entity_id: media_player.roam
mode: single

The error I’m getting is:
Message malformed: extra keys not allowed @ data[‘sequence’][2][‘parallel’][1][0][‘platform’]

I hope that someone can help me with this.
Cheers!

Why not simply have another automation that stops the alarm after it’s been sounding for 30 minutes?

That was just much easier to do… Thanks!

The actual problem was the indentation. Should have been:

  - parallel:  # Run these actions simultaneously
    - delay: 00:30:00  # Wait for 30 minutes
    - wait_for_trigger:  # Wait for alarm disarm
        - platform: state
          entity_id: alarm_control_panel.alarmo
          to: disarmed