Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95419

Script sequence with wait_template not waiting for other script to complete

$
0
0

@JasperE wrote:

In the following script, media_player.play_media is executed while script script.kodi_on is running.
Even though I have configured a wait_template to wait for script.kodi_on to finish.

Can anybody explain why this might be the case? Is this by design or should I try to workaround with flipping an input_bool.kodi_on_running and configuring a wait_template for the input_bool instead of the script.kodi_on state?


script:
  youtube_playlist_play:
    sequence:
    - service: script.turn_on
      entity_id: script.kodi_on
    - delay: 00:00:01
    - wait_template: "{{ is_state('script.kodi_on', 'off') }}"
      timeout: '00:01:00'
    - service: media_player.play_media
      data:
        entity_id: media_player.kodi
        media_content_type: playlist 
        media_content_id: plugin://plugin.video.youtube/play/some/url
     
  kodi_on:
    sequence:
    - condition: template
      value_template: "{{ state_attr('remote.woonkamer', 'current_activity') != 'Kodi' }}"
    - service: remote.turn_on
      entity_id: remote.woonkamer
      data:
        activity: Kodi
    - delay: 00:00:03
    - wait_template: "{{ state_attr('remote.woonkamer', 'current_activity') == 'Kodi' }}"
      timeout: '00:00:10'
    - wait_template: "{{ not is_state('media_player.kodi', 'off') }}"
      timeout: '00:00:30'
    - delay: 00:00:15

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>