forked from BeardedTinker/Home-Assistant_Config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathradio_play.yaml
46 lines (45 loc) · 3.11 KB
/
radio_play.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#####
# Radio player - script to start playing radio with selected values.
#
#####
radio_play:
alias: Play Radio on Chromecast Audio
sequence:
- service: media_player.volume_set
data:
entity_id: >
{% if is_state("input_select.radio_speaker", "Living room") %} media_player.living_room_tv_2
{% elif is_state("input_select.radio_speaker", "Loft TV") %} media_player.loft_tv
{% elif is_state("input_select.radio_speaker", "Display me") %} media_player.display_me
{% elif is_state("input_select.radio_speaker", "Mini me") %} media_player.mini_me
{% elif is_state("input_select.radio_speaker", "Whatever me") %} media_player.whatever_me
{% elif is_state("input_select.radio_speaker", "Clock me") %} media_player.clock_me
{% elif is_state("input_select.radio_speaker", "All speakers") %} media_player.all_speakers
{% endif %}
volume_level: '{{ states("input_number.radio_volume") }}'
- service: media_player.play_media
data:
entity_id: >
{% if is_state("input_select.radio_speaker", "Downstairs") %} media_player.downstairs
{% elif is_state("input_select.radio_speaker", "Upstairs") %} media_player.upper_floor
{% elif is_state("input_select.radio_speaker", "Display me") %} media_player.display_me
{% elif is_state("input_select.radio_speaker", "Mini me") %} media_player.mini_me
{% elif is_state("input_select.radio_speaker", "Whatever me") %} media_player.whatever_me
{% elif is_state("input_select.radio_speaker", "Clock me") %} media_player.clock_me
{% elif is_state("input_select.radio_speaker", "All speakers") %} media_player.all_speakers
{% endif %}
media_content_id: >
{% if is_state("input_select.radio_station", "HKR") %} http://stream.hkr.hr:8000/hkr.aac
{% elif is_state("input_select.radio_station", "Otvoreni") %} http://proxima.shoutca.st:8357/stream
{% elif is_state("input_select.radio_station", "Antena Christmas") %} http://live.antenazagreb.hr:8015/stream
{% elif is_state("input_select.radio_station", "Antena Love") %} http://live.antenazagreb.hr:8007/stream
{% elif is_state("input_select.radio_station", "Antena Rock") %} http://live.antenazagreb.hr:8019/stream
{% elif is_state("input_select.radio_station", "Antena Zagreb") %} http://live.antenazagreb.hr:8000/stream
{% elif is_state("input_select.radio_station", "Narodni") %} http://live.narodni.hr:8059/stream
{% elif is_state("input_select.radio_station", "yammat FM") %} http://live.narodni.hr:8059/stream
{% elif is_state("input_select.radio_station", "Radio Marija") %} https://dreamsiteradiocp2.com/proxy/rmcroatia?mp=/stream
{% elif is_state("input_select.radio_station", "Radio Postaja Mir Međugorje") %} http://213.133.102.58:23565/stream
{% elif is_state("input_select.radio_station", "HRT1") %} https://21223.live.streamtheworld.com/PROGRAM1AAC_SC
{% elif is_state("input_select.radio_station", "HRT2") %} https://20073.live.streamtheworld.com:3690/PROGRAM2AAC_SC
{% endif %}
media_content_type: 'audio/mp4'