Chromecast (web)radio player with selectors for Radio Station and Speakers.
Hardware used: Chromecast Audio and Chromecast “regular” (1st gen.)
Frontend:
View:
group:
Residence Radio:
name: Residentie Radio
entities:
- input_select.radio_station
- input_select.chromecast_radio
- script.radio538
Selectors:
input_select:
radio_station:
name: 'Select Radio Station:'
options:
- Radio 538
- Q-Music
- 3FM
- 100% NL
- Veronica
- Sky Radio
- Arrow Classic Rock
- Classic FM
- BNR Nieuwsradio
- SLAM! Hardstyle
- Sleep Radio
- Ambient Sleeping Pill
- Radio Art - Sleep
- Ambi Nature Radio
- Calm Radio - Sleep
- Dinamo.FM Sleep
chromecast_radio:
name: 'Select Speakers:'
options:
- Livingroom
- Bedroom
- Bathroom
- Hall
- Everywhere
initial: Everywhere
icon: mdi:speaker-wireless
Script:
radio538:
alias: Play Radio on Chromecast Audio
sequence:
- service: media_player.volume_set
data:
entity_id: media_player.ca_hall
volume_level: '0.35'
- service: media_player.volume_set
data:
entity_id: media_player.ca_bathroom
volume_level: '0.20'
- service: media_player.volume_set
data:
entity_id: media_player.ca_livingroom
volume_level: '0.30'
- service: media_player.play_media
data_template:
entity_id: >
{% if is_state("input_select.chromecast_radio", "Livingroom") %} media_player.ca_livingroom
{% elif is_state("input_select.chromecast_radio", "Hall") %} media_player.ca_hall
{% elif is_state("input_select.chromecast_radio", "Bedroom") %} media_player.bed_room
{% elif is_state("input_select.chromecast_radio", "Bathroom") %} media_player.ca_bathroom
{% elif is_state("input_select.chromecast_radio", "Everywhere") %} media_player.home_group
{% endif %}
media_content_id: >
{% if is_state("input_select.radio_station", "Radio 538") %} http://vip-icecast.538.lw.triple-it.nl:80/RADIO538_MP3
{% elif is_state("input_select.radio_station", "Q-Music") %} http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3
{% elif is_state("input_select.radio_station", "3FM") %} http://icecast.omroep.nl/3fm-bb-mp3
{% elif is_state("input_select.radio_station", "100% NL") %} http://stream.100p.nl/100pctnl.mp3
{% elif is_state("input_select.radio_station", "Veronica") %} http://8543.live.streamtheworld.com/VERONICACMP3
{% elif is_state("input_select.radio_station", "Sky Radio") %} http://8623.live.streamtheworld.com:80/SKYRADIOAAC_SC
{% elif is_state("input_select.radio_station", "Arrow Classic Rock") %} http://91.221.151.155/listen.mp3
{% elif is_state("input_select.radio_station", "Classic FM") %} http://19143.live.streamtheworld.com/CLASSICFM_SC
{% elif is_state("input_select.radio_station", "BNR Nieuwsradio") %} http://icecast-bnr.cdp.triple-it.nl/bnr_mp3_96_03
{% elif is_state("input_select.radio_station", "SLAM! Hardstyle") %} http://vip-icecast.538.lw.triple-it.nl/WEB17_MP3
{% elif is_state("input_select.radio_station", "Sleep Radio") %} http://37.59.28.208:8722/stream
{% elif is_state("input_select.radio_station", "Ambient Sleeping Pill") %} http://perseus.shoutca.st:8447/h
{% elif is_state("input_select.radio_station", "Radio Art - Sleep") %} http://live.radioart.com/fSleep.mp3
{% elif is_state("input_select.radio_station", "Ambi Nature Radio") %} http://94.23.252.14:8067/stream
{% elif is_state("input_select.radio_station", "Calm Radio - Sleep") %} http://streams.calmradio.com/api/39/128/stream
{% elif is_state("input_select.radio_station", "Dinamo.FM Sleep") %} http://channels.dinamo.fm/sleep-aac
{% endif %}
media_content_type: 'audio/mp4'
Customize script name:
customize:
script.radio538:
friendly_name: Start Playing
icon: mdi:play
Enjoy!