Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Radio
- trigger:
- platform: state
- entity_id: input_select.radio_station
- action:
- - service: script.turn_on
- data_template:
- entity_id:
- - service: media_player.play_media
- data_template:
- entity_id: >
- {% if input_select.radio_station_location == 'Kitchen' %}
- media_player.kitchen
- {%-elif input_select.radio_station_location == 'Backyard' %}
- media_player.backyard
- {% endif %}
- media_content_id: >
- {% if input_select.radio_station == 'Hot108' %}
- "http://jbmedia-edge1.cdnstream.com:80/hot108"
- {%-elif input_select.radio_station == 'The Beat' %}
- "http://live.leanstream.co/CKBTFM-MP3"
- {% endif %}
- media_content_type: 'audio/mp3'
- - service: input_select.select_option
- data:
- entity_id: input_select.radio_station
- option: "-"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement