  - alias: "Receiver On when Sonos plays in stue"
    trigger:
      - platform: state 
        entity_id: media_player.stue
        from: 'paused'
        to: 'playing'
    action:
      - service: media_player.turn_on
        entity_id: media_player.denon_avr_x2300w
      - delay: '00:00:10'
      - service: media_player.select_source
        data:
          entity_id: media_player.denon_avr_x2300w
          source: Sonos
      - service: media_player.volume_set
        data:
          entity_id: media_player.stue
          volume_level: 1.00
      - service: media_player.volume_set
        data:
          entity_id: media_player.denon_avr_x2300w
          volume_level: 0.30
  - alias: "Receiver Off when Sonos stops playing in stue"
    trigger:
      - platform: state 
        entity_id: media_player.stue
        from: 'playing'
        to: 'paused'
    action:
      - service: media_player.select_source
        data:
          entity_id: media_player.denon_avr_x2300w
          source: TV Audio
      - service: media_player.volume_set
        data:
          entity_id: media_player.denon_avr_x2300w
          volume_level: 0.30
      - service: media_player.turn_off
        entity_id: media_player.denon_avr_x2300w
