Hello I have an automation which has a task to turn on my ceiling speaker, and to first play from my chromecast system message “Showering process start”, and then to switch to another source for AVR Zone2 (spotify) to play.
alias: Start shower
icon: "mdi:party-popper"
description: 'User has started showering process'
sequence:
- service: script.turn_off
entity_id: script.stop_showering
- service: persistent_notification.create
data:
title: '1'
message: "."
- service: switch.turn_on
entity_id: switch.bathroom_main_light
- service: script.turn_on
entity_id: script.play_notification
data:
variables:
speaker: "media_player.bathroom_ceiling_speaker"
source: "Primary Chromecast"
volume: "0.4"
custom_message: "Shower starte!I'm happy for you!"
platform: "tts.google_translate_say"
delay: "00:00:03"
chromecast_device: "media_player.system_chromecast"
snapshot: False
- wait_template: "{{ is_state('media_player.system_chromecast', 'idle') }}"
timeout: '00:00:10'
continue_on_timeout: 'true'
- service: script.turn_on
data:
variables:
source_avr: media_player.avr_zone2
volume_avr: 0.7
speaker: media_player.bathroom_ceiling_speaker
speaker_source: "AVR Zone2"
volume_speaker: 0.5
target:
entity_id: script.play_spotify
- service: persistent_notification.create
data:
title: '2'
message: "."
- service: switch.turn_off
entity_id: switch.bathroom_main_light
Im having problem that after message, it doesnt change source…and I noticed that turn off the main light switch is happening too quick, like there is no other services to be called begore that one. I dont want parallel execution opf services, only “linear”.