techblog

ilRadio Script

Jan 1st, 2018
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.74 KB | None | 0 0
  1. ilradio:
  2.     alias: Play Radio on Chromecast Audio
  3.     sequence:
  4.       - service: media_player.volume_set
  5.         data:
  6.            entity_id: media_player.living_room_tv
  7.            volume_level: '0.50'
  8.       -  service: media_player.play_media
  9.          data_template:
  10.            entity_id: >
  11.            {% if is_state("input_select.chromecast_radio", "Livingroom") %} media_player.living_room_tv
  12.             {% endif %}
  13.            media_content_id: >
  14.            {% if is_state("input_select.radio_station", "GalGalatz") %} http://player.gl.bynetcdn.com/Redirector/glz/glglz/ICE-live
  15.             {% elif is_state("input_select.radio_station", "Galatz") %} http://player.gl.bynetcdn.com/Redirector/glz/glz/ICE-live
  16.             {% elif is_state("input_select.radio_station", "Radius 100FM") %} http://100fm.streamgates.net/Radios100Fm
  17.             {% elif is_state("input_select.radio_station", "Echo 99FM") %} http://99.livecdn.biz/99fm_aac
  18.             {% elif is_state("input_select.radio_station", "Kan 88FM") %} http://radiocast-rr-d.vidnt.com/ipbc_IPBC88LAM
  19.             {% elif is_state("input_select.radio_station", "103FM") %} http://103fm.live.streamgates.net/103fm_live/1multix/icecast.audio
  20.             {% elif is_state("input_select.radio_station", "Lev Hamedina 91FM") %} http://gb92.multix-technologies.com/Lev91Fm
  21.             {% elif is_state("input_select.radio_station", "Reshet Gimel") %} http://radiocast-rr-d.vidnt.com/ipbc_IPBCgimmelLAM
  22.             {% elif is_state("input_select.radio_station", "Radio Darom") %} http://audio-darom.ecast.co.il:9000/darom97fm
  23.             {% elif is_state("input_select.radio_station", "Kol Hayam Haadom 102FM") %} http://eilat.cdnwz.net/102fm
  24.             {% endif %}
  25.            media_content_type: 'audio/mp4'
Advertisement
Add Comment
Please, Sign In to add comment