-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathswitch.yaml
1251 lines (1147 loc) · 43.6 KB
/
switch.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
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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Template Switches
- platform: template
switches:
# drinking board games
board_games_party:
unique_id: board_games_party
friendly_name: Board Games Party
value_template: >
{{ is_state('group.party_script_board_games_party', 'on') and is_state('switch.lzw45_mood_lighting', 'on') }}
turn_on:
- service: script.party_on
data:
party: board_games_party
artist: Empire of the Sun
pixel_effect: aurora
entities:
- switch.hyperion_rainbow_swirl_fast
turn_off:
- service: script.party_off
data:
party: board_games_party
# 80s party
the_80s_party:
unique_id: the_80s_party
friendly_name: 80s Party
value_template: >
{{ is_state('group.party_script_the_80s_party', 'on') and is_state('switch.lzw45_mood_lighting', 'on') }}
turn_on:
- service: script.party_on
data:
party: the_80s_party
artist: I Heart 80s
pixel_effect: aurora
entities:
- switch.hyperion_rainbow_swirl_fast
turn_off:
- service: script.party_off
data:
party: the_80s_party
# christmas party
christmas_party:
unique_id: christmas_party
friendly_name: Christmas Party
value_template: >
{{ is_state('group.party_script_christmas_party', 'on') and is_state('switch.lzw45_mood_lighting', 'on') }}
turn_on:
- service: script.party_on
data:
party: christmas_party
artist: I Heart Christmas
quick_color: 120
entities:
- switch.hyperion_solid_green
- light.christmas_tree
turn_off:
- service: script.party_off
data:
party: christmas_party
# LZW MOOD LIGHTING
lzw45_mood_lighting:
unique_id: lzw45_mood_lighting
friendly_name: Mood Lighting
value_template: "{{ states('input_text.lzw45_last_effect') != 'off' }}"
turn_on:
- service: input_number.set_value
data:
entity_id: input_number.quick_strip_color_temp
value: 2700
- service: input_select.select_option
data:
entity_id: input_select.quick_strip_effect
option: solid
turn_off:
- choose:
- conditions:
- condition: template
value_template: "{{ is_state('input_select.quick_strip_effect', 'off') }}"
sequence:
- service: script.lzw45_ui_quick_effect
- service: input_text.set_value
data:
entity_id: input_text.lzw45_last_effect
value: "off"
default:
service: input_select.select_option
data:
entity_id: input_select.quick_strip_effect
option: 'off'
# XBOX HARMONY ACTIVITY
xbox_one:
unique_id: 2bb5c91b-5ff2-41d5-b1fa-7fa603c54fee
friendly_name: Xbox One
value_template: >
{%- from 'harmony.jinja' import xbox_one as f -%}{{- f() -}}
turn_on:
- service: script.harmony_activity_on
data:
activity: Xbox One
turn_off: &harmony_activity_off
- service: script.harmony_activity_off
# PLAYSTATION HARMONY ACTIVITY
playstation:
unique_id: 8b9bae0f-2eb8-4af3-bb54-3d0252437ad6
friendly_name: Playstation
value_template: >
{%- from 'harmony.jinja' import playstation as f -%}{{- f() -}}
turn_on:
- service: script.harmony_activity_on
data:
activity: Playstation
turn_off: *harmony_activity_off
# SWITCH HARMONY ACTIVITY
switch:
unique_id: 9c1d6eab-6652-4531-b8d3-30662b4fb928
friendly_name: Switch
value_template: >
{%- from 'harmony.jinja' import switch as f -%}{{- f() -}}
turn_on:
- service: script.harmony_activity_on
data:
activity: Switch
turn_off: *harmony_activity_off
# TV HARMONY ACTIVITY
tv:
unique_id: ec14504b-9b62-4b44-bcf1-5d0218e4504d
friendly_name: TV
value_template: >
{%- from 'harmony.jinja' import tv as f -%}{{- f() -}}
turn_on:
- service: script.harmony_activity_on
data:
activity: TV
turn_off: *harmony_activity_off
# CHROMECAST HARMONY ACTIVITY
chromecast:
unique_id: c27197a0-e746-4873-ae62-737784541cf5
friendly_name: Chromecast
value_template: >
{%- from 'harmony.jinja' import chromecast as f -%}{{- f() -}}
turn_on:
- service: script.harmony_activity_on
data:
activity: Chromecast
turn_off: &chromecast_off
- service: script.harmony_activity_off
- service: script.stop_casting
# OFF ACTIVITY
poweroff:
unique_id: ab55c1de-77f1-49f6-9b70-2237e96847be
friendly_name: Power Off
value_template: >
{%- from 'harmony.jinja' import power_off as f -%}{{- f() -}}
turn_on: &harmony_all_off
- service: script.harmony_all_off
turn_off: *harmony_all_off
# ROKU HARMONY ACTIVITY
roku:
unique_id: 9b436b75-1a7e-4d5f-a2ad-016308a8cbef
friendly_name: Roku
value_template: >
{%- from 'harmony.jinja' import roku as f -%}{{- f() -}}
turn_on:
- service: script.harmony_activity_on
data:
activity: Roku
turn_off: *harmony_activity_off
# APPLE TV
apple_tv:
unique_id: 7aa5614a-9bea-4088-b950-e22f3d8e1061
friendly_name: Apple TV
value_template: >
{{ is_state('switch.roku', 'on') and
is_state_attr('media_player.roku_living_room', 'source', 'Apple TV') }}
turn_on:
- service: script.roku_source_on
data:
source: Apple TV
turn_off: &turn_off_roku
- service: switch.turn_off
entity_id: switch.roku
# NETFLIX
netflix:
unique_id: b289f6f7-ab1b-4c58-9f78-7044b1e33457
friendly_name: Netflix
value_template: >
{{ is_state('switch.roku', 'on') and
is_state_attr('media_player.roku_living_room', 'source', 'Netflix') }}
turn_on:
- service: script.roku_source_on
data:
source: Netflix
turn_off: *turn_off_roku
# HBO
hbo:
unique_id: c1c2a1f3-a01f-4e58-8ab9-d4fc8bd82832
friendly_name: HBO
value_template: >
{{ is_state('switch.roku', 'on') and
is_state_attr('media_player.roku_living_room', 'source', 'Max') }}
turn_on:
- service: script.roku_source_on
data:
source: Max
turn_off: *turn_off_roku
# Hulu
hulu:
unique_id: dbbc7f9c-3737-4e2e-bb81-de71495b1d7e
friendly_name: Hulu
value_template: >
{{ is_state('switch.roku', 'on') and
is_state_attr('media_player.roku_living_room', 'source', 'Hulu') }}
turn_on:
- service: script.roku_source_on
data:
source: Hulu
turn_off: *turn_off_roku
# Prime Video
prime_video:
unique_id: e93b60fb-9f47-411e-8672-81674a2f9061
friendly_name: Prime Video
value_template: >
{{ is_state('switch.roku', 'on') and
is_state_attr('media_player.roku_living_room', 'source', 'Prime Video') }}
turn_on:
- service: script.roku_source_on
data:
source: Prime Video
turn_off: *turn_off_roku
# Disney Plus
disney_plus:
unique_id: 8971c31c-5529-4fc6-b98b-113b8c38b8a6
friendly_name: Disney Plus
value_template: >
{{ is_state('switch.roku', 'on') and
is_state_attr('media_player.roku_living_room', 'source', 'Disney Plus') }}
turn_on:
- service: script.roku_source_on
data:
source: Disney Plus
turn_off: *turn_off_roku
# Plex
plex:
unique_id: 263a42a3-25e8-43ac-a39b-2eaa07d3711f
friendly_name: Plex
value_template: >
{{ is_state('switch.roku', 'on') and 'plex' in state_attr('media_player.roku_living_room', 'source') | string | lower }}
turn_on:
- service: script.roku_source_on
data:
source: >
{%- set player = expand('media_player.roku_living_room') | first %}
{%- set ns = namespace(ret=[]) %}
{%- for source in player.attributes.source_list %}
{%- if 'plex' in source.lower() %}
{%- set ns.ret = ns.ret + [ source ] %}
{%- endif %}
{%- endfor %}
{{ ns.ret | first | default('Plex - Free Movies & TV') }}
turn_off: *turn_off_roku
# Peacock
peacock:
unique_id: 966ded9b-6022-44fb-93f3-3924b35d392f
friendly_name: Peacock
value_template: >
{{ is_state('switch.roku', 'on') and
is_state_attr('media_player.roku_living_room', 'source', 'Peacock TV') }}
turn_on:
- service: script.roku_source_on
data:
source: Peacock TV
turn_off: *turn_off_roku
echo_through_receiver:
unique_id: a7bcc52e-6cba-459d-9aaf-e67a0b6ca7bc
friendly_name: Echo
value_template: >
{{ is_state_attr('media_player.yamaha_rx_v6a_zone2', 'source', 'Echo')
and is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Echo')
and is_state('switch.floating_outlet_switch', 'on') }}
turn_on:
- service: script.echo_through_receiver_on
turn_off:
- service: script.echo_through_receiver_off
airplay_through_receiver:
unique_id: d5d0e235-776f-4c99-b6dd-127007bb032d
friendly_name: Airplay
value_template: >
{{ is_state_attr('media_player.yamaha_rx_v6a_zone2', 'source', 'AirPlay')
and is_state_attr('media_player.yamaha_rx_v6a', 'source', 'AirPlay') }}
turn_on:
- service: script.airplay_through_receiver_on
turn_off:
- service: script.echo_through_receiver_off
#####################
# LIVING ROOM MUSIC #
#####################
echo_through_living_room:
unique_id: 815d21aa-2822-4f94-a840-9210d82ecb56
friendly_name: Echo
value_template: >
{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Echo')
and is_state('switch.floating_outlet_switch', 'on') }}
turn_on:
- service: script.echo_through_media_player
data:
switch: switch.floating_outlet_switch
media_player: media_player.yamaha_rx_v6a
desired_state: "on"
source: Echo
turn_off:
- service: script.echo_through_media_player
data:
switch: switch.floating_outlet_switch
media_player: media_player.yamaha_rx_v6a
desired_state: "off"
source: Echo
living_room_airplay:
unique_id: 9c196f1e-5b2a-4377-9717-e69745d3a93e
friendly_name: Airplay
value_template: >
{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'AirPlay') }}
turn_on:
- service: script.media_player_on
data:
media_player: media_player.yamaha_rx_v6a
volume: 0.7
source: AirPlay
turn_off:
- service: script.media_player_off
data:
media_player: media_player.yamaha_rx_v6a
#####################
# DINING ROOM MUSIC #
#####################
echo_through_dining_room:
unique_id: f5862f89-1245-42bc-a1c2-0c9476513b5d
friendly_name: Echo
value_template: >
{{ is_state_attr('media_player.yamaha_rx_v6a_zone2', 'source', 'Echo')
and is_state('switch.floating_outlet_switch', 'on') }}
turn_on:
- service: script.echo_through_media_player
data:
switch: switch.floating_outlet_switch
media_player: media_player.yamaha_rx_v6a_zone2
desired_state: "on"
source: Echo
turn_off:
- service: script.echo_through_media_player
data:
switch: switch.floating_outlet_switch
media_player: media_player.yamaha_rx_v6a_zone2
desired_state: "off"
source: Echo
dining_room_airplay:
unique_id: 7f266638-f0b9-4cc5-bfd9-3243a5433e81
friendly_name: Airplay
value_template: >
{{ is_state_attr('media_player.yamaha_rx_v6a_zone2', 'source', 'AirPlay') }}
turn_on:
- service: script.media_player_on
data:
media_player: media_player.yamaha_rx_v6a_zone2
volume: 0.7
source: AirPlay
turn_off:
- service: script.media_player_off
data:
media_player: media_player.yamaha_rx_v6a_zone2
##############
# DECK MUSIC #
##############
echo_through_deck:
unique_id: a0040da5-1837-495a-a7e6-880dac87985a
friendly_name: Echo
value_template: >
{{ is_state_attr('media_player.yamaha_receiver', 'source', 'Echo')
and is_state('switch.basement_bluetooth', 'on') }}
turn_on:
- service: script.echo_through_media_player
data:
switch: switch.basement_bluetooth
media_player: media_player.yamaha_receiver
desired_state: "on"
source: Echo
turn_off:
- service: script.echo_through_media_player
data:
switch: switch.basement_bluetooth
media_player: media_player.yamaha_receiver
desired_state: "off"
source: Echo
deck_airplay:
unique_id: 168dea92-5fd4-4888-b5d7-7b97393bdd16
friendly_name: Airplay
value_template: >
{{ is_state_attr('media_player.yamaha_receiver', 'source', 'AirPlay') }}
turn_on:
- service: script.media_player_on
data:
media_player: media_player.yamaha_receiver
volume: 0.7
source: AirPlay
turn_off:
- service: script.media_player_off
data:
media_player: media_player.yamaha_receiver
##################
# BASEMENT MUSIC #
##################
echo_through_basement:
unique_id: fde6c03a-07c5-4ad0-9dc6-742214a59d7b
friendly_name: Echo
value_template: >
{{ is_state_attr('media_player.yamaha_receiver_zone_2', 'source', 'Echo')
and is_state('switch.basement_bluetooth', 'on') }}
turn_on:
- service: script.echo_through_media_player
data:
switch: switch.basement_bluetooth
media_player: media_player.yamaha_receiver_zone_2
desired_state: "on"
source: Echo
turn_off:
- service: script.echo_through_media_player
data:
switch: switch.basement_bluetooth
media_player: media_player.yamaha_receiver_zone_2
desired_state: "off"
source: Echo
basement_airplay:
unique_id: 1e6e1c2f-379d-4937-9d8d-635d9bbb719c
friendly_name: Airplay
value_template: >
{{ is_state_attr('media_player.yamaha_receiver_zone_2', 'source', 'AirPlay') }}
turn_on:
- service: script.media_player_on
data:
media_player: media_player.yamaha_receiver_zone_2
volume: 0.7
source: AirPlay
turn_off:
- service: script.media_player_off
data:
media_player: media_player.yamaha_receiver_zone_2
#############################
# Receiver Sources - RX-V6A #
#############################
# Xbox Source
xbox_source:
unique_id: 29fe3012-52fe-4ccc-b28d-5c6ac93e2067
friendly_name: Xbox One Source
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Xbox One') }}"
turn_on: &xbox_source
- service: media_player.select_source
data:
entity_id: media_player.yamaha_rx_v6a
source: Xbox One
turn_off: *xbox_source
# Playstation Source
playstation_source:
unique_id: a7f75a01-aac8-4ee2-b5e1-87aa0bb5fcd6
friendly_name: Playstation Source
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'PlayStation 5') }}"
turn_on: &playstation_source
- service: media_player.select_source
data:
entity_id: media_player.yamaha_rx_v6a
source: PlayStation 5
turn_off: *playstation_source
# Switch Source
nintendo_switch_source:
unique_id: 3aa122cd-d3e2-465a-8334-eb127a10cda7
friendly_name: Switch Source
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Switch') }}"
turn_on: &nintendo_switch_source
- service: media_player.select_source
data:
entity_id: media_player.yamaha_rx_v6a
source: Switch
turn_off: *nintendo_switch_source
# Roku Source
roku_source:
unique_id: db0937e0-4c4d-49d6-9ab2-9e264bad79b9
friendly_name: Roku Source
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Roku') }}"
turn_on: &roku_source
- service: media_player.select_source
data:
entity_id: media_player.yamaha_rx_v6a
source: Roku
turn_off: *roku_source
# Phone Source
phone_source:
unique_id: 46ed2e61-aef2-4c03-9e90-b5b8018c9335
friendly_name: Aux Source
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Phone') }}"
turn_on: &phone_source
- service: media_player.select_source
data:
entity_id: media_player.yamaha_rx_v6a
source: Phone
turn_off: *phone_source
# Phone Source
chromecast_source:
unique_id: 050698b4-fdb1-4057-b963-f8996745a67e
friendly_name: Chromecast Source
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Chromecast') }}"
turn_on: &chromecast_source
- service: media_player.select_source
data:
entity_id: media_player.yamaha_rx_v6a
source: Chromecast
turn_off: *chromecast_source
# Alexa Source
alexa_source:
unique_id: ac227fe0-8517-4461-b636-b65f9a36eef7
friendly_name: Alexa Source
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a', 'source', 'Echo') }}"
turn_on: &alexa_source
- service: media_player.select_source
data:
entity_id: media_player.yamaha_rx_v6a
source: Echo
turn_off: *alexa_source
#################################
# Surround Sound Modes - RX-V6A #
#################################
# Standard Surround Mode
surround_mode_standard:
unique_id: 2c57142d-92b1-4e8c-b78c-aea0050efa15
friendly_name: Standard
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','standard') }}"
turn_on: &surround_standard
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: standard
turn_off: *surround_standard
# Munich Sound Mode
surround_mode_munich:
unique_id: c8952e7c-c8aa-47d2-bacb-ba1c5e17fff7
friendly_name: Munich
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','munich') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: munich
turn_off: *surround_standard
# Vienna Sound Mode
surround_mode_vienna:
unique_id: d660b24c-e46b-4a45-b4a0-1eef7a4141c5
friendly_name: Vienna
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','vienna') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: vienna
turn_off: *surround_standard
# Chamber Sound Mode
surround_mode_chamber:
unique_id: 6376f72b-d71e-414f-9f1c-57b0676040ef
friendly_name: Chamber
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','chamber') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: chamber
turn_off: *surround_standard
# Cellar Club Sound Mode
surround_mode_cellar_club:
unique_id: acbf1fc5-3180-4f8b-817a-86f3e36c23a7
friendly_name: Cellar Club
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','cellar_club') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: cellar_club
turn_off: *surround_standard
# Roxy Theatre Sound Mode
surround_mode_roxy_theatre:
unique_id: 0f3f7222-4597-4cff-bf3d-9ec8059a57e1
friendly_name: Roxy Theatre
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','roxy_theatre') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: roxy_theatre
turn_off: *surround_standard
# Bottom Line Sound Mode
surround_mode_bottom_line:
unique_id: 59a9e3d2-f9da-4e74-8ed7-0d5c6e965df6
friendly_name: Bottom Line
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','bottom_line') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: bottom_line
turn_off: *surround_standard
# Sports Sound Mode
surround_mode_sports:
unique_id: c707d043-1724-4238-ad21-893992ff1237
friendly_name: Sports
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','sports') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: sports
turn_off: *surround_standard
# Action Game Sound Mode
surround_mode_action_game:
unique_id: 6e3a8556-daa2-44e8-8857-290ec880becb
friendly_name: Action Game
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','action_game') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: action_game
turn_off: *surround_standard
# Roleplaying Game Sound Mode
surround_mode_roleplaying_game:
unique_id: 79a1c453-57cf-4eef-bc73-ce83ddb4a5aa
friendly_name: Roleplaying Game
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','roleplaying_game') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: roleplaying_game
turn_off: *surround_standard
# Music Video Sound Mode
surround_mode_music_video:
unique_id: 698237a6-2522-4acf-a5e4-5e3f15e4ad7f
friendly_name: Music Video
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','music_video') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: music_video
turn_off: *surround_standard
# Spectacle Sound Mode
surround_mode_spectacle:
unique_id: be1ebe28-1204-408b-9ae0-c889fbe54a86
friendly_name: Spectacle
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','spectacle') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: spectacle
turn_off: *surround_standard
# Sci-Fi Sound Mode
surround_mode_sci_fi:
unique_id: 51b21944-665a-4a58-a8a2-1c873aba70a9
friendly_name: Sci Fi
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','sci-fi') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: sci-fi
turn_off: *surround_standard
# Adventure Sound Mode
surround_mode_adventure:
unique_id: b96f55a4-7310-4131-86de-b8d546c4a14e
friendly_name: Adventure
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','adventure') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: adventure
turn_off: *surround_standard
# Drama Sound Mode
surround_mode_drama:
unique_id: c8339810-5bb6-4d2f-91ee-59b735160d09
friendly_name: Drama
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','drama') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: drama
turn_off: *surround_standard
# Mono Movie Sound Mode
surround_mode_mono_movie:
unique_id: 6bd940fc-ecf4-4d14-9d93-4b0c08377d6b
friendly_name: Mono Movie
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','mono_movie') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: mono_movie
turn_off: *surround_standard
# 2ch Stereo Sound Mode
surround_mode_2ch_stereo:
unique_id: 0bb27816-d492-4328-966f-fe72451052c5
friendly_name: 2 Channel Stereo
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','2ch_stereo') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: 2ch_stereo
turn_off: *surround_standard
# All Ch Stereo Sound Mode
surround_mode_all_ch_stereo:
unique_id: 8e496e08-266e-48b7-8ef7-f8436832b599
friendly_name: All Channel Stereo
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','all_ch_stereo') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: all_ch_stereo
turn_off: *surround_standard
# Surr Decoder Sound Mode
surround_mode_surr_decoder:
unique_id: a3b2e4c0-62af-4597-93e4-350c6cded877
friendly_name: Surround Sound
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','surr_decoder') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: surr_decoder
turn_off: *surround_standard
# Straight Sound Mode
surround_mode_straight:
unique_id: 3431583e-1064-4c82-8f02-924f01290b00
friendly_name: Straight
value_template: "{{ is_state_attr('media_player.yamaha_rx_v6a','sound_mode','straight') }}"
turn_on:
- service: media_player.select_sound_mode
data:
entity_id: media_player.yamaha_rx_v6a
sound_mode: straight
turn_off: *surround_standard
############
# Hyperion #
############
hyperion:
unique_id: hyperion
value_template: >
{%- set entities = 'switch.gpio_18_tv_component_led_device', 'switch.gpio_18_tv_component_usb_capture' %}
{{ entities | select('is_state', 'on') | list | count == 2 }}
turn_on:
- service: light.turn_on
target:
entity_id:
- switch.gpio_18_tv_component_led_device
- switch.gpio_18_tv_component_usb_capture
turn_off:
- service: light.turn_off
target:
entity_id:
- switch.gpio_18_tv_component_led_device
- switch.gpio_18_tv_component_usb_capture
hyperion_usb_capture:
unique_id: hyperion_usb_capture
value_template: >
{%- set entities = 'switch.gpio_18_tv_component_led_device', 'switch.gpio_18_tv_component_usb_capture' %}
{{ entities | select('is_state', 'on') | list | count == 2 }}
turn_on:
- service: switch.turn_on
entity_id:
- switch.gpio_18_tv_component_led_device
- switch.gpio_18_tv_component_usb_capture
turn_off:
- service: homeassistant.turn_off
target:
entity_id:
- switch.gpio_18_tv_component_led_device
- switch.gpio_18_tv_component_usb_capture
hyperion_cinema:
unique_id: hyperion_cinema
value_template: >
{%- set entity = 'light.gpio_18_tv' %}
{{ is_state(entity, 'on') and is_state_attr(entity, 'effect', 'Cinema dim lights') }}
turn_on:
- service: switch.turn_on
entity_id: switch.gpio_18_tv_component_led_device
- service: light.turn_on
target:
entity_id: light.gpio_18_tv
data:
brightness: 255
effect: Cinema dim lights
turn_off:
- service: homeassistant.turn_off
target:
entity_id:
- light.gpio_18_tv
- switch.gpio_18_tv_component_led_device
hyperion_rainbow_swirl_fast:
unique_id: hyperion_rainbow_swirl_fast
value_template: >
{%- set entity = 'light.gpio_18_tv' %}
{{ is_state(entity, 'on') and is_state_attr(entity, 'effect', 'Rainbow swirl fast') }}
turn_on:
- service: switch.turn_on
entity_id: switch.gpio_18_tv_component_led_device
- service: light.turn_on
target:
entity_id: light.gpio_18_tv
data:
brightness: 255
effect: Rainbow swirl fast
turn_off:
- service: homeassistant.turn_off
target:
entity_id:
- light.gpio_18_tv
- switch.gpio_18_tv_component_led_device
hyperion_solid_green:
unique_id: hyperion_solid_green
value_template: >
{%- set entity = 'light.gpio_18_tv' %}
{%- set is_solid = is_state_attr(entity, 'effect', 'Solid') %}
{%- set is_green = is_state_attr(entity, 'rgb_color', (0, 255, 0)) %}
{{ is_state(entity, 'on') and is_solid and is_green }}
turn_on:
- service: switch.turn_on
entity_id: switch.gpio_18_tv_component_led_device
- service: light.turn_on
target:
entity_id: light.gpio_18_tv
data:
brightness: 255
rgb_color: [0, 255, 0]
turn_off:
- service: homeassistant.turn_off
target:
entity_id:
- light.gpio_18_tv
- switch.gpio_18_tv_component_led_device
########
# CAST #
########
cast_workout_core:
unique_id: cast_workout_core
value_template: >
{{ states('media_player.chromecast') in ['playing','paused'] and
is_state_attr('media_player.chromecast', 'media_title', 'Core') }}
turn_on: &cast_workout_core
- service: script.cast_workout_video
data:
workout: Core
turn_off: *chromecast_off
cast_workout_cardio_kickboxing:
unique_id: cast_workout_cardio_kickboxing
value_template: >
{{ states('media_player.chromecast') in ['playing','paused'] and
is_state_attr('media_player.chromecast', 'media_title', 'Cardio Kickboxing') }}
turn_on: &cast_workout_cardio_kickboxing
- service: script.cast_workout_video
data:
workout: Cardio Kickboxing
turn_off: *chromecast_off
cast_workout_lower_body:
unique_id: cast_workout_lower_body
value_template: >
{{ states('media_player.chromecast') in ['playing','paused'] and
is_state_attr('media_player.chromecast', 'media_title', 'Lower Body') }}
turn_on: &cast_workout_lower_body
- service: script.cast_workout_video
data:
workout: Lower Body
turn_off: *chromecast_off
cast_workout_total_body:
unique_id: cast_workout_total_body
value_template: >
{{ states('media_player.chromecast') in ['playing','paused'] and
is_state_attr('media_player.chromecast', 'media_title', 'Total Body') }}
turn_on: &cast_workout_total_body
- service: script.cast_workout_video
data:
workout: Total Body
turn_off: *chromecast_off
cast_workout_upper_body:
unique_id: cast_workout_upper_body
value_template: >
{{ states('media_player.chromecast') in ['playing','paused'] and
is_state_attr('media_player.chromecast', 'media_title', 'Upper Body') }}
turn_on: &cast_workout_upper_body
- service: script.cast_workout_video
data:
workout: Upper Body
turn_off: *chromecast_off
########
# WLED #
########
# WLED Kitchen Cabinet 2, matches switch.kitchen_cabinet (zwave)
kitchen_cabinet_2:
unique_id: 84c17669-2405-4aae-9e4d-06bd58f42964
value_template: >
{% set rgbw = (255, 199, 125, 0) %}
{% set brightness = 217 %}
{% set entities = ['light.cabinet_surface'] %}
{% set matching = entities | select('is_state', 'on') | select('is_state_attr', 'rgbw_color', rgbw) | select('is_state_attr', 'brightness', brightness) | list %}
{{ entities | length == matching | length }}
turn_on:
- action: light.turn_on
target: &wled_match_downlight