-
Notifications
You must be signed in to change notification settings - Fork 2
/
scripts.yaml
57 lines (55 loc) · 3.21 KB
/
scripts.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
47
48
49
50
51
52
53
54
55
56
57
# Radio play script
radio_play:
alias: Play Radio on Chromecast
sequence:
- service: media_player.volume_set
data:
entity_id: >
{% if 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
{% endif %}
volume_level: '{{ states("input_number.radio_volume") }}'
- service: media_player.play_media
data:
entity_id: >
{% if 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
{% endif %}
media_content_id: >
{% if is_state("input_select.radio_station", "1.FM") %} https://strm112.1.fm/crock_mobile_mp3
{% elif is_state("input_select.radio_station", "Otvoreni") %} http://proxima.shoutca.st:8357/stream
{% elif is_state("input_select.radio_station", "2x2") %} http://95.104.192.220:8001/radio2x2.ogg
{% endif %}
media_content_type: 'music'
radio_play2:
alias: Play TuneIn
sequence:
- service: media_player.volume_set
data:
entity_id: >
{% if is_state("input_select.radio_speaker", "Display me") %} media_player.display_me
{% elif is_state("input_select.radio_speaker", "Woonkamer Nest") %} media_player.woonkamer_nest
{% elif is_state("input_select.radio_speaker", "Girls Slaapkamer") %} media_player.girls_slaapkamer
{% elif is_state("input_select.radio_speaker", "Buro Mini") %} media_player.buro_mini
{% endif %}
volume_level: '{{ states("input_number.radio_volume") }}'
- service: media_player.play_media
data:
entity_id: >
{% if is_state("input_select.radio_speaker", "Display me") %} media_player.display_me
{% elif is_state("input_select.radio_speaker", "Woonkamer Nest") %} media_player.woonkamer_nest
{% elif is_state("input_select.radio_speaker", "Girls Slaapkamer") %} media_player.girls_slaapkamer
{% elif is_state("input_select.radio_speaker", "Buro Mini") %} media_player.buro_mini
{% endif %}
media_content_id: >
{% if is_state("input_select.radio_station", "Nostalgie Vlaanderen") %} https://21253.live.streamtheworld.com/NOSTALGIEWHATAFEELING.mp3
{% elif is_state("input_select.radio_station", "Nostalgie Extra") %} https://22653.live.streamtheworld.com/NOSTALGIEWAFEXTRA.mp3
{% elif is_state("input_select.radio_station", "Nostalgie Extra 90's") %} https://22653.live.streamtheworld.com/NOSTALGIEWAF90.mp3
{% 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: 'music'