Hi all,
Got a new Denon instead of my old Yamaha.
After some tweaking this is my universal remote control which solves all sorts of quirks with HEOS (Airplay/internet radio). See the comments below why each special attribute was needed.
This is media_player.yaml:
- platform: universal
name: living_room_denon
unique_id: living_room_denon
device_class: receiver
children:
- media_player.living_room_denon_avr
- media_player.living_room_denon_heos
browse_media_entity: media_player.living_room_denon_heos
# state_template required because otherwise when you leave it on HEOS it shows wrong status
state_template: >
{% if is_state_attr('media_player.living_room_denon_avr', 'source', 'HEOS Music') %}
{{states('media_player.living_room_denon_heos')}}
{% else %}
{{states('media_player.living_room_denon_avr')}}
{% endif %}
# active_child_template required because otherwise you can't start/stop properly with HEOS
active_child_template: >
{% if is_state_attr('media_player.living_room_denon_avr', 'source', 'HEOS Music') %}
media_player.living_room_denon_heos
{% else %}
media_player.living_room_denon_avr
{% endif %}
commands:
turn_off:
action: media_player.turn_off
data:
entity_id: media_player.living_room_denon_avr
turn_on:
action: media_player.turn_on
data:
entity_id: media_player.living_room_denon_avr
volume_up:
action: media_player.volume_up
data:
entity_id: media_player.living_room_denon_avr
volume_down:
action: media_player.volume_down
data:
entity_id: media_player.living_room_denon_avr
select_sound_mode:
action: media_player.select_sound_mode
target:
entity_id: media_player.living_room_denon_avr
data:
sound_mode: "{{ sound_mode }}"
attributes:
sound_mode: media_player.living_room_denon_avr|sound_mode
sound_mode_raw: media_player.living_room_denon_avr|sound_mode_raw
sound_mode_list: media_player.living_room_denon_avr|sound_mode_list
# source_list required because otherwise HEOS Music source does not show up when AVR is active child
source_list: input_select.receiver_source_list|options
It’s worth mentioning that I’ve also went in to the receiver’s setup and had hidden all other inputs and renames the ones I needed to the right names as is the receiver_source_list:
This is input_select.yaml:
receiver_source_list:
name: receiver_source_list
options:
- DVD
- KODI
- XBOX
- HEOS Music
Good luck.