Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- entity_register.yaml
- ###
- media_player.kok:
- config_entry_id:
- name:
- platform: cast
- unique_id: d10e088a-d912-3e33-ab99-d0a40de8ded7
- scripts.yaml
- ###
- radio538:
- alias: Play Radio on Chromecast Audio
- sequence:
- - service: media_player.volume_set
- data:
- entity_id: media_player.sovrum
- volume_level: '0.75'
- - service: media_player.play_media
- data_template:
- entity_id: >
- {% if is_state("input_select.chromecast_radio", "Sovrum") %} media_player.sovrum
- {% endif %}
- media_content_id: >
- {% if is_state("input_select.radio_station", "P4 Sjuhärad") %} http://http-live.sr.se/p4sjuharad-mp3-192
- {% elif is_state("input_select.radio_station", "Lugna Favoriter") %} http://fm03-icecast.mtg-r.net/fm03_mp3
- {% elif is_state("input_select.radio_station", "Bandit Rock") %} http://fm02-icecast.mtg-r.net/fm02_mp3
- {% endif %}
- media_content_type: 'audio/mp4'
- configuration.yaml
- ###
- input_select:
- radio_station:
- name: 'Select Radio Station:'
- options:
- - P4 Sjuhärad
- - Lugna Favoriter
- - Bandit Rock
- chromecast_radio:
- name: 'Select Speakers:'
- options:
- - Sovrum
- - kok
- initial: Sovrum
- icon: mdi:speaker-wireless
Advertisement
Add Comment
Please, Sign In to add comment