receiver_sonos_mch_stereo:
  alias: Receiver Sonos MCH Stereo
  sequence:
    - service: media_player.turn_on
      target:
        entity_id: media_player.denon_avr_x2300w
    - delay: "00:00:03"
    - service: media_player.select_source
      data:
        entity_id: media_player.denon_avr_x2300w
        source: Sonos
    - delay: "00:00:01"
    - service: media_player.select_sound_mode
      data:
        entity_id: media_player.denon_avr_x2300w
        sound_mode: MCH STEREO

receiver_tv_dolby_digital:
  alias: Receiver TV Dolby Digital
  sequence:
    - service: media_player.turn_on
      target:
        entity_id: media_player.denon_avr_x2300w
    - delay: "00:00:03"
    - service: media_player.select_source
      data:
        entity_id: media_player.denon_avr_x2300w
        source: TV Audio
    - delay: "00:00:01"
    - service: media_player.select_sound_mode
      data:
        entity_id: media_player.denon_avr_x2300w
        sound_mode: DOLBY DIGITAL

receiver_tv_mch_stereo:
  alias: Receiver TV MCH Stereo
  sequence:
    - service: media_player.turn_on
      target:
        entity_id: media_player.denon_avr_x2300w
    - delay: "00:00:03"
    - service: media_player.select_source
      data:
        entity_id: media_player.denon_avr_x2300w
        source: TV Audio
    - delay: "00:00:01"
    - service: media_player.select_sound_mode
      data:
        entity_id: media_player.denon_avr_x2300w
        sound_mode: MCH STEREO

receiver_volume_up_5:
  alias: Receiver Volume Up 5
  sequence:
    - service: media_player.volume_set
      data:
        entity_id: media_player.denon_avr_x2300w
        volume_level: >
          {{ [((state_attr('media_player.denon_avr_x2300w', 'volume_level') | float(0)) + 0.05), 1] | min }}

receiver_volume_down_5:
  alias: Receiver Volume Down 5
  sequence:
    - service: media_player.volume_set
      data:
        entity_id: media_player.denon_avr_x2300w
        volume_level: >
          {{ [((state_attr('media_player.denon_avr_x2300w', 'volume_level') | float(0)) - 0.05), 0] | max }}