-
Notifications
You must be signed in to change notification settings - Fork 7
/
playlist.yaml
executable file
·92 lines (81 loc) · 4.25 KB
/
playlist.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#################################################################
## Inputs
input_select:
playlist_content:
initial: Michigan Radio
options:
- Chicago Blues
- Late Night Jazz
- Jazzy Dinner
- Classical Essentials
- Morning Classical
- "Piano 100: Spotify Picks"
- Michigan Radio
- WRCJ
- The News
- Ocean Sounds
- None
playlist_source:
initial: Kitchen Stereo
options:
- Kitchen Stereo
- Bedroom Speaker
- Basement Group
#################################################################
## Scripts
script:
playlist_remote:
sequence:
playlist_action:
sequence:
- service: notify.ga_command
data_template:
message: >
{% if is_state("input_select.playlist_content", "Chicago Blues") %} Shuffle Chicago Blues playlist on {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "Late Night Jazz") %} Shuffle Late Night Jazz playlist on {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "Jazzy Dinner") %} Shuffle Jazzy Dinner playlist on {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "Classical Essentials") %} Shuffle Classical Essentials playlist on {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "Morning Classical") %} Shuffle Morning Classical playlist on {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "Piano 100: Spotify Picks") %} "Shuffle Piano 100 Spotify Picks playlist on" {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "Michigan Radio") %} Cast Michigan Radio on {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "WRCJ") %} Cast WRCJ on {{ states('input_select.playlist_source') }}
{% elif is_state("input_select.playlist_content", "The News") %} Cast The News on {{ states('input_select.playlist_source') }}
{% endif %}
- service: media_player.play_media
data_template:
media_content_id: >
{% if is_state("input_select.playlist_content", "Ocean Sounds") %} https://www.gstatic.com/voice_delight/sounds/long/ocean.mp3
{% endif %}
media_content_type: 'audio/mp4'
entity_id: >
{% if is_state("input_select.playlist_source", "Kitchen Stereo") %} media_player.kitchen_stereo
{% elif is_state("input_select.playlist_source", "Bedroom Speaker") %} media_player.bedroom_speaker
{% elif is_state("input_select.playlist_source", "Basement Group") %} media_player.basement_group
{% endif %}
playlist_stop:
sequence:
service: homeassistant.turn_off
data_template:
entity_id: >
{% if is_state("input_select.playlist_source", "Kitchen Stereo") %} media_player.kitchen_stereo
{% elif is_state("input_select.playlist_source", "Bedroom Speaker") %} media_player.bedroom_speaker
{% elif is_state("input_select.playlist_source", "Basement Group") %} media_player.basement_group
{% endif %}
playlist_volup:
sequence:
service: media_player.volume_up
data_template:
entity_id: >
{% if is_state("input_select.playlist_source", "Kitchen Stereo") %} media_player.nadc338
{% elif is_state("input_select.playlist_source", "Bedroom Speaker") %} media_player.bedroom_speaker
{% elif is_state("input_select.playlist_source", "Basement Group") %} media_player.basement_group
{% endif %}
playlist_voldown:
sequence:
service: media_player.volume_down
data_template:
entity_id: >
{% if is_state("input_select.playlist_source", "Kitchen Stereo") %} media_player.nadc338
{% elif is_state("input_select.playlist_source", "Bedroom Speaker") %} media_player.bedroom_speaker
{% elif is_state("input_select.playlist_source", "Basement Group") %} media_player.basement_group
{% endif %}