Scripting problem

hello.
Setting up my automation im trying to set up wakemeup script for turning my tx and reciver on,then turning kodi to play some media.

    alias: mediacenter on
    sequence:
     - service: switch.turn_on
       entity_id:
        - switch.lg_power
     - service: switch.turn_on
       entity_id:
        - switch.pioneer_power
     - wait_template: "{{ states.media_player.zal.states == 'idle' }}" 
     - service: media_player.play_media
       data:
         entity_id: media_player.zal
         media_content_id: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
         media_content_type: "video/mp4"

but i recived some errors about dictionary and maybe someone can point me to finish ?

please re-post your code with code blocks so we can help:

1 Like

It doesn’t look like your indentation is correct, you need 2 spaces not one just about everywhere :slight_smile:

Here’s a version that is at least syntactically correct.
You’ll have to see if it does what you want.

mcon:
  alias: mediacenter on
  sequence:
    - service: switch.turn_on
      entity_id:  switch.lg_power
    - service: switch.turn_on
      entity_id: switch.pioneer_power
    - wait_template: "{{ states.media_player.zal.states == 'idle' }}" 
    - service: media_player.play_media
      data:
        entity_id: media_player.zal
        media_content_id: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
        media_content_type: "video/mp4"
1 Like

ty works flawlesly !