-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathswitch.yaml
More file actions
370 lines (358 loc) · 10.4 KB
/
switch.yaml
File metadata and controls
370 lines (358 loc) · 10.4 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
- platform: template
switches:
gateway:
value_template: >
{% if is_state('switch.gateway','on') %}
false
{% endif %}
turn_on:
service: remote.send_command
data:
entity_id: remote.0x588e81fffedac58f_pair
command: reboot
turn_off:
netflix:
value_template: >
{% if is_state('sensor.media_source','Netflix') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: Netflix
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
live_tv:
value_template: >
{% if is_state('sensor.media_source','Live TV') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
turn_off:
- service: media_player.turn_off
data:
entity_id: media_player.lg_webos_smart_tv
prime:
value_template: >
{% if is_state('sensor.media_source','Amazon Prime Video') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Amazon Prime Video'
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
now:
value_template: >
{% if is_state('sensor.media_source','NOW') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'NOW'
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
tube:
value_template: >
{% if is_state('sensor.media_source','YouTube') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'YouTube'
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
browser:
value_template: >
{% if is_state('sensor.media_source','Web Browser') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Web Browser'
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
iplayer:
value_template: >
{% if is_state('sensor.media_source','BBC iPlayer') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'BBC iPlayer'
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
dvd:
value_template: >
{% if is_state('sensor.media_source','LG') %}
true
{% else %}
false
{% endif %}
turn_on:
- service: media_player.turn_on
data:
entity_id: media_player.lg_webos_smart_tv
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'LG'
turn_off:
- service: media_player.select_source
data:
entity_id: media_player.lg_webos_smart_tv
source: 'Live TV'
tv_screen:
turn_on:
- service: webostv.command
data:
entity_id: media_player.lg_webos_smart_tv
command: com.webos.service.tvpower/power/turnOnScreen
turn_off:
- service: webostv.command
data:
entity_id: media_player.lg_webos_smart_tv
command: com.webos.service.tvpower/power/turnOffScreen
dark:
value_template: >
{% if is_state('sensor.light_state','Dark') %}
true
{% endif %}
turn_on:
- service: script.dark
turn_off:
- service: light.turn_off
data:
entity_id: light.all_living_room
relaxed:
value_template: >
{% if is_state('sensor.light_state','Relaxed') %}
true
{% endif %}
turn_on:
- service: script.relaxed
turn_off:
- service: light.turn_off
data:
entity_id: light.all_living_room
bright:
value_template: >
{% if is_state('sensor.light_state','Bright') %}
true
{% endif %}
turn_on:
- service: script.bright
turn_off:
- service: light.turn_off
data:
entity_id: light.all_living_room
bbc1:
friendly_name: BBC 1
value_template: >
{% if is_state('switch.bbc1','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "BBC ONE HD"
turn_off:
bbc2:
friendly_name: BBC 2
value_template: >
{% if is_state('switch.bbc2','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "BBC TWO HD"
turn_off:
itv1:
friendly_name: ITV 1
value_template: >
{% if is_state('switch.itv1','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "ITV HD"
turn_off:
ch_4:
friendly_name: Channel 4
value_template: >
{% if is_state('switch.ch_4','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "Channel 4 HD"
turn_off:
ch_5:
friendly_name: Channel 5
value_template: >
{% if is_state('switch.ch_4','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "Channel 5 HD"
turn_off:
bbc4:
friendly_name: BBC 4
value_template: >
{% if is_state('switch.bbc4','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "BBC FOUR HD"
turn_off:
bbc_news:
friendly_name: BBC News
value_template: >
{% if is_state('switch.bbc_news','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "BBC NEWS HD"
turn_off:
quest:
friendly_name: Quest
value_template: >
{% if is_state('switch.quest','on') %}
false
{% endif %}
turn_on:
- service: script.tvchannel
data:
channel: "QUEST HD"
turn_off:
audio_clear:
friendly_name: Audio Clear
value_template: >
{% if is_state('switch.audio_clear','on') %}
false
{% endif %}
turn_on:
- service: shell_command.audio
turn_off:
audio_movie:
friendly_name: Audio Movie
value_template: >
{% if is_state('switch.audio_movie','on') %}
false
{% endif %}
turn_on:
- service: shell_command.movie
turn_off:
audio_music:
friendly_name: Audio Music
value_template: >
{% if is_state('switch.audio_music','on') %}
false
{% endif %}
turn_on:
- service: shell_command.music
turn_off:
audio_delault:
friendly_name: Audio Default
value_template: >
{% if is_state('switch.audio_default','on') %}
false
{% endif %}
turn_on:
- service: shell_command.default
turn_off:
audio_game:
friendly_name: Audio Game
value_template: >
{% if is_state('switch.audio_game','on') %}
false
{% endif %}
turn_on:
- service: shell_command.game
turn_off:
audio_sports:
friendly_name: Audio Game
value_template: >
{% if is_state('switch.audio_sports','on') %}
false
{% endif %}
turn_on:
- service: shell_command.sports
turn_off: