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>>