Problem z uruchamianiem skruptu. "Script to resume Google Cast" (rozwiązano)

Konfiguruję skrypt do wznawiania muzyki po powiadomieniu.
Script to resume Google Cast devices after they have been interrupted by any action - Share your Projects! - Home Assistant Community
Wszystko ładnie działa jak odpalam skrypt ręcznie w usługach.

  service: script.turn_on
  target:
    entity_id: script.google_home_resume
  data:
    variables:
      action:
        - alias: "Send TTS message"
          service: tts.ais_tts_local_say
          target:
            entity_id: media_player.kuchnia
          data:
            message: "Brama z tyłu otwarta."
          extra:
            volume: 0.5

A jak tworzę z tego poniższą automatyzację to odtwarza powiadomienie ale już nie chce wznawiać muzyki.

description: ''
trigger:
  - platform: state
    entity_id:
      - binary_sensor.stan_bramy_przod
    for:
      hours: 0
      minutes: 0
      seconds: 3
    from: 'off'
    to: 'on'
condition: []
action:
  - service: script.turn_on
    data: {}
    target:
      entity_id: script.google_home_resume
  - service: tts.ais_tts_local_say
    data:
      entity_id: media_player.kuchnia
      message: Brama z tyłu otwarta.
mode: single

Gdzie jest błąd?

Rozwiązanie znalazłem na forum ha w dyskusji toczącej się pod tematem. Składnia musi wyglądać nieco inaczej.

description: Test automation for Spotify Resume, using script by TheFes
trigger:
  - platform: state
    entity_id:
      - binary_sensor.stan_bramy_przod
    for:
      hours: 0
      minutes: 0
      seconds: 3
    from: 'off'
    to: 'on'
condition: []
action:
  - service: script.turn_on
    target:
      entity_id: script.google_home_resume
    data:
      variables:
        action:
          - service: tts.ais_tts_local_say
            target:
              entity_id: media_player.kuchnia
            data:
              message: Brama z przodu otwarta.
            extra:
              volume: 0.2
mode: single
2 polubienia