Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- radio_start:
- alias: Play Radio on Chromecast Audio
- sequence:
- - service: media_player.volume_set
- data_template:
- entity_id: >
- {% if is_state("input_select.radio_speakers", "Living Room Audio") %} media_player.salotto_audio
- {% elif is_state("input_select.radio_speakers", "Chromecast Salotto") %} media_player.salotto
- {% elif is_state("input_select.radio_speakers", "Chromecast Camera Letto") %} media_player.camera_da_letto
- {% elif is_state("input_select.radio_speakers", "Gruppo Media Player") %} group.media_player
- {% endif %}
- volume_level: '{{ states.input_number.radio_volume.state | float }}'
- - service: media_player.play_media
- data_template:
- entity_id: >
- {% if is_state("input_select.radio_speakers", "Living Room Audio") %} media_player.salotto_audio
- {% elif is_state("input_select.radio_speakers", "Chromecast Salotto") %} media_player.salotto
- {% elif is_state("input_select.radio_speakers", "Chromecast Camera Letto") %} media_player.camera_da_letto
- {% elif is_state("input_select.radio_speakers", "Gruppo Media Player") %} group.media_player
- {% endif %}
- media_content_id: >
- {% if 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://19993.live.streamtheworld.com:80/SKYRADIO_SC6
- {% 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:8453/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
- {% elif is_state("input_select.radio_station", "Hot 108") %} http://jbmedia-edge1.cdnstream.com:80/hot108
- {% elif is_state("input_select.radio_station", "The Beat") %} http://live.leanstream.co/CKBTFM-MP3
- {% elif is_state("input_select.radio_station", "Alt Rock") %} http://149.56.23.7:20254/stream
- {% elif is_state("input_select.radio_station", "Energy 98") %} http://174.127.85.10:8800
- {% elif is_state("input_select.radio_station", "Hit Remixes") %} http://149.56.23.7:20252/stream
- {% elif is_state("input_select.radio_station", "Play Radio") %} http://176.9.31.78:8222
- {% elif is_state("input_select.radio_station", "Elium-Rock") %} http://listen.radionomy.com/Elium-Rock
- {% elif is_state("input_select.radio_station", "Classic Rock Florida") %} http://listen.shoutcast.com/Classic-RockFlorida
- {% endif %}
- media_content_type: 'audio/mp4'
- radio_stop:
- alias: Stop Radio on Chromecast
- sequence:
- - service: media_player.media_stop
- data_template:
- entity_id: >
- {% if is_state("input_select.radio_speakers", "Living Room") %} media_player.salotto_audio
- {% elif is_state("input_select.radio_speakers", "Chromecast Salotto") %} media_player.salotto
- {% elif is_state("input_select.radio_speakers", "Chromecast Camera Letto") %} media_player.camera_da_letto
- {% elif is_state("input_select.radio_speakers", "Gruppo Media Player") %} group.media_player
- {% endif %}
- radio_change_speakers:
- alias: Change Radio Speakers
- sequence:
- - service: media_player.media_stop
- data_template:
- entity_id: >
- {% if previous_speakers == "Living Room" %} media_player.salotto_audio
- {% elif previous_speakers == "Chromecast Salotto" %} media_player.salotto
- {% elif previous_speakers == "Chromecast Camera Letto" %} media_player.camera_da_letto
- {% elif previous_speakers == "Gruppo Media Player" %} group.media_player
- {% endif %}
- - service: input_boolean.turn_off
- entity_id: input_boolean.radio_play
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement