# Når apple tv skifter til source DRTV eller TV 2 PLAY, så skift audiomode til MCH STEREO på Denon reciever.
# Ellers sæt audiomode til DOLBY DIGITAL

- alias: "ATV playing DRTV, change sound to MCH STEREO"
  trigger:
  - platform: state
    entity_id: sensor.living_room_tv_source
    to: 'DRTV'
  action:
    service: media_player.select_sound_mode
    data:
      sound_mode: MCH STEREO
      entity_id: media_player.denon_avr_x2300w

- alias: "ATV playing TV2PLAY, change sound to MCH STEREO"
  trigger:
  - platform: state
    entity_id: sensor.living_room_tv_source
    to: 'TV 2 PLAY'
  action:
    service: media_player.select_sound_mode
    data: 
      sound_mode: MCH STEREO
      entity_id: media_player.denon_avr_x2300w

- alias: "ATV playing Netflix, change sound to DOLBY DIGITAL"
  trigger:
  - platform: state
    entity_id: sensor.living_room_tv_source
    to: 'Netflix'
  action:
    service: media_player.select_sound_mode
    data:
      sound_mode: DOLBY DIGITAL
      entity_id: media_player.denon_avr_x2300w
