Script Sequence Not Working Correctly

Interesting scenario, I am calling a script in an automation that has 5 service calls however only the last service call is executed. When I run the script manually from the UI it works as expected however when it’s triggered from the automation only the last step runs. I have tried switching the order of the service calls, I have tried it from the automation by not using a script. I also tried using just one media_player but for some reason nothing seems to work for firing off the media_player service calls. I included the configuration and part of the log file showing the script being executed (in bold) for the last step only (in bold).

I have never seen this behavior in a script or automation sequence before, any ideas why the sequence steps are not being executed?

doorbell:
  alias: Front doorbell pressed
  sequence:
    - service: media_player.turn_on
      entity_id:
        - media_player.kitchen_speaker
        - media_player.bedroom_speaker
    - service: media_player.volume_set
      data:
        entity_id:
          - media_player.kitchen_speaker
          - media_player.bedroom_speaker
        volume_level: 0.6
    - service: media_player.volume_mute
      data:
        entity_id:
          - media_player.kitchen_speaker
          - media_player.bedroom_speaker
        is_volume_muted: "false"
    - service: tts.google_say
      entity_id:
        - media_player.kitchen_speaker
        - media_player.bedroom_speaker
      data_template:
        message: 'Front doorbell has been pressed. There is someone at the front door'
    - service: notify.HA_Home
      data:
        title: "Door Bell Notification"
        message: There is someone at the front door. DoorBell was pressed at {{now().strftime("%c")}}

2018-06-14 12:55:57 INFO (MainThread) [homeassistant.components.automation] Executing Front Door Bell
2018-06-14 12:55:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event logbook_entry[L]: name=Front Door Bell, message=has been triggered, domain=automation, entity_id=automation.front_door_bell>
2018-06-14 12:55:57 INFO (MainThread) [homeassistant.helpers.script] Script Front Door Bell: Running script
2018-06-14 12:55:57 INFO (MainThread) [homeassistant.helpers.script] Script Front Door Bell: Executing step call service
2018-06-14 12:55:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=ha_home, service_data=title=Door Bell Notification, message=There is someone at the front door. DoorBell was pressed at {{now().strftime("%c")}}, service_call_id=140692987753360-81>
2018-06-14 12:55:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.doorbell_sensor_sourcenodeid, old_state=<state sensor.doorbell_sensor_sourcenodeid=0; node_id=4, value_index=2, value_instance=1, value_id=72057594111082529, unit_of_measurement=, friendly_name=doorbell_sensor SourceNodeId, hidden=True @ 2018-06-14T12:55:46.886840-04:00>, new_state=<state sensor.doorbell_sensor_sourcenodeid=0; node_id=4, value_index=2, value_instance=1, value_id=72057594111082529, unit_of_measurement=, friendly_name=doorbell_sensor SourceNodeId, hidden=True @ 2018-06-14T12:55:57.132310-04:00>>

Nothing really stands out to me other than you mix providing your entity_id’s in and out of your data templates. I’ve seen that cause issues before, maybe try placing them all in your data/data_template sections?

So I understand, is it just moving the entity_id’s under the data/data_template for each service? Do you know if there any examples I can reference? Thx

You’ve got your own example!

So only this one looks like it would need to change, I am assuming this would be the correct configuration. I’ll try it out.

service: tts.google_say
data_template:
  message: 'Front doorbell has been pressed. There is someone at the front door'
entity_id:
  - media_player.kitchen_speaker
  - media_player.bedroom_speaker

Unfortunately this change made no difference. Again it works fine when trigger manually from the UI but fails to trigger the sequence for the media_player and just the last sequence for the notification is triggered. I don’t understand how it bypasses them.

Perhaps enabling debugger is of help?

Only thing I am seeing is what I posted above where the script runs and triggers only the last sequence in the script.

So i run all my scripts with the services requests at the end of the script, so it would look something like this for you one,

doorbell:
  alias: Front doorbell pressed
  sequence:
    - entity_id:
        - media_player.kitchen_speaker
        - media_player.bedroom_speaker
      service: media_player.turn_on
    - data:
        entity_id:
          - media_player.kitchen_speaker
          - media_player.bedroom_speaker
        volume_level: 0.6
      service: media_player.volume_set
    - data:
        entity_id:
          - media_player.kitchen_speaker
          - media_player.bedroom_speaker
        is_volume_muted: "false"
      service: media_player.volume_mute
    - entity_id:
        - media_player.kitchen_speaker
        - media_player.bedroom_speaker
      data_template:
        message: 'Front doorbell has been pressed. There is someone at the front door'
      service: tts.google_say
    - data:
        title: "Door Bell Notification"
        message: There is someone at the front door. DoorBell was pressed at {{now().strftime("%c")}}
      service: notify.HA_Home

No idea if it would make any difference, I am still new to HA and learning each day, but only thing I can think to suggest trying out.

:blush:
Ugh, my apologies. Turns out I was updating the wrong automation file and the script was never getting updated with the sequences. I knew it was too odd and should have been working. Thanks to everyone that responded.