actions:
- alias: if stereo playing
  else:
  - alias: if tv on
    else:
    - alias: else nth or else none
      else:
      - action: input_select.select_option
        data:
          option: none
        metadata: {}
        target:
          entity_id: input_select.current_player
      - action: input_boolean.turn_off
        data: {}
        metadata: {}
        target:
          entity_id: input_boolean.movie_mode
      if:
      - condition: or
        conditions:
        - condition: and
          conditions:
          - condition: state
            entity_id: input_select.current_player
            state:
            - tv
          - condition: device
            device_id: 2b6001cb3b88c366db218da366024e02
            domain: remote
            entity_id: 9bcb0948239cad67a6b53975d44b4be7
            type: is_on
        - condition: and
          conditions:
          - condition: state
            entity_id: input_select.current_player
            state:
            - stereo
          - condition: device
            device_id: 7eb1d0285898a07e62fb959f3cffda68
            domain: binary_sensor
            entity_id: a752fc33615b016173772b2930ec8bae
            type: is_connected
          - condition: or
            conditions:
            - condition: device
              device_id: 2e779a3bc4caf93c7ef04bebf820db5e
              domain: media_player
              entity_id: 6585548c46800d19233bb0366d7a8531
              type: is_paused
            - condition: device
              device_id: 2e779a3bc4caf93c7ef04bebf820db5e
              domain: media_player
              entity_id: 6585548c46800d19233bb0366d7a8531
              type: is_idle
        - condition: and
          conditions:
          - condition: state
            entity_id: input_select.current_player
            state:
            - chrome-cast-salon
          - condition: or
            conditions:
            - condition: device
              device_id: cff31d197ebc32fc58f5f8f55df6e406
              domain: media_player
              entity_id: 473f2d90bcd458999408818034870b40
              type: is_paused
            - condition: device
              device_id: cff31d197ebc32fc58f5f8f55df6e406
              domain: media_player
              entity_id: 473f2d90bcd458999408818034870b40
              type: is_idle
          enabled: false
      then: []
    if:
    - condition: device
      device_id: 2b6001cb3b88c366db218da366024e02
      domain: remote
      entity_id: 9bcb0948239cad67a6b53975d44b4be7
      type: is_on
    then:
    - action: input_select.select_option
      data:
        option: tv
      metadata: {}
      target:
        entity_id: input_select.current_player
    - action: input_boolean.turn_on
      data: {}
      metadata: {}
      target:
        entity_id: input_boolean.movie_mode
  - alias: if chrome cast 4k playing
    enabled: false
    if:
    - condition: device
      device_id: cff31d197ebc32fc58f5f8f55df6e406
      domain: media_player
      entity_id: 473f2d90bcd458999408818034870b40
      type: is_playing
    then:
    - action: input_select.select_option
      data:
        option: chrome-cast-salon
      metadata: {}
      target:
        entity_id: input_select.current_player
    - action: input_boolean.turn_on
      data: {}
      metadata: {}
      target:
        entity_id: input_boolean.movie_mode
  if:
  - condition: device
    device_id: 2e779a3bc4caf93c7ef04bebf820db5e
    domain: media_player
    entity_id: 6585548c46800d19233bb0366d7a8531
    type: is_playing
  then:
  - action: input_select.select_option
    data:
      option: stereo
    metadata: {}
    target:
      entity_id: input_select.current_player
alias: Set current_player
conditions: []
description: ''
id: '1764333473250'
mode: single
triggers:
- seconds: /15
  trigger: time_pattern
