Play two mp3 in automation

The only way, I got this working, is adding a delay. This delay must be one second longer, than the first mp3.

The automation does not look, how long your mp3 is. It fire’s the action to play the first file, and right after it it fire’s the second, so the first is “overruled”.

This way the automation wait’s, until the first file finish and fire’s the second command after the delay.

Works fine here…

  alias: gg_food_waste
  trigger:
    platform: time
    at: '19:45:00'
  condition:
    condition: time
    weekday:
      - tue
      - thu
      - sat
  action:
  - data:
      entity_id: group.google_mini
      volume_level: '0.7'
    service: media_player.volume_set
  - data:
      entity_id: group.google_mini
      media_content_id: '/media/local/1.mp3'
      media_content_type: audio/mp3
  - delay: '00:04:32' #The lenght of the first mp3 plus one second
    service: media_player.play_media  
  - data:
      entity_id: group.google_mini
      media_content_id: '/media/local/2.mp3'
      media_content_type: audio/mp3
    service: media_player.play_media