Inspired from @Bob_NL [Chromecast Radio with station and player selection] I made something similar for the Netradio feature on Yamaha AVRs.
Group:
group:
yamaha_radio:
name: Yamaha Radio
entities:
- input_select.yamaha_radio_station
- script.yamaha_radio
Selector:
input_select:
yamaha_radio_station:
name: 'Select Radio Station:'
options:
- BBC Radio1
- BBC Radio 1Xtra
- 538 - Dance Department
- 538 IBIZA
- Ibiza Sonica 95.2 FM
- DNB FM
- dnbzone laut.fm
Script:
script:
yamaha_radio:
sequence:
- service: media_player.turn_on
data:
entity_id: media_player.yamaha_receiver
- service: media_player.volume_set
data:
entity_id: media_player.yamaha_receiver
volume_level: 0.48
- service: media_player.play_media
data_template:
entity_id: media_player.yamaha_receiver
media_content_type: "NET RADIO"
media_content_id: >
{% if is_state("input_select.yamaha_radio_station", "BBC Radio1") %} Lesezeichen>Radio>BBC Radio 1
{% elif is_state("input_select.yamaha_radio_station", "BBC Radio 1Xtra") %} Lesezeichen>Radio>BBC Radio 1Xtra
{% elif is_state("input_select.yamaha_radio_station", "538 - Dance Department") %} Lesezeichen>Radio>538 - Dance Department
{% elif is_state("input_select.yamaha_radio_station", "538 IBIZA") %} Lesezeichen>Radio>538 IBIZA
{% elif is_state("input_select.yamaha_radio_station", "Ibiza Sonica 95.2 FM") %} Lesezeichen>Radio>Ibiza Sonica 95.2 FM
{% elif is_state("input_select.yamaha_radio_station", "DNB FM") %} Lesezeichen>Radio>DNB FM
{% elif is_state("input_select.yamaha_radio_station", "dnbzone laut.fm") %} Lesezeichen>Radio>dnbzone laut.fm
{% endif %}
Customize:
customize:
script.yamaha_radio:
friendly_name: Start Playing
icon: mdi:play
There is a small bug in the yamaha rxv library - when there are more items that fit in one screen (normally about 8) - then you can’t select them. I already created a PR for that.