-
Notifications
You must be signed in to change notification settings - Fork 3
/
lovelace-homekitesq.yaml
948 lines (845 loc) · 31.1 KB
/
lovelace-homekitesq.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
button_card_templates: !include_dir_merge_named templates/lovelace-homekitesq/
kiosk_mode:
hide_header: true
views:
- type: custom:grid-layout
path: 0
layout:
#default
margin: 0
grid-gap: 3.5vw #var(--custom-layout-card-padding) #from themes.yaml
grid-template-columns: repeat(5, 1fr) 0
grid-template-rows: 0 repeat(2, fit-content(100%)) 0fr
grid-template-areas: |
"sidebar . . . . ."
"sidebar home security climate rooms ."
"sidebar media cameras outside rooms2 ."
"sidebar footer1 footer1 footer1 footer1 ."
"sidebar footer2 footer2 footer2 footer2 ."
mediaquery:
#phone
"(max-width: 800px)":
grid-gap: calc(var(--custom-layout-card-padding) * 1.7)
grid-template-columns: 0 repeat(2, 1fr) 0
grid-template-rows: 0 repeat(5, fit-content(100%)) 0fr
grid-template-areas: |
". . . ."
". sidebar sidebar ."
". home security ."
". media cameras ."
". climate outside ."
". rooms rooms2 ."
". footer1 footer1 ."
". footer2 footer2 ."
#portrait
"(max-width: 2000px)":
grid-gap: 4.4vw 3vw #4vw and 3.5vw
grid-template-columns: repeat(5, 1fr) 0
grid-template-rows: 0 repeat(2, fit-content(100%)) 0fr #0 repeat(2, fit-content(100%)) 0fr
grid-template-areas: |
"sidebar . . . . ."
"sidebar home security climate rooms ."
"sidebar media cameras outside rooms2 ."
"sidebar footer1 footer1 footer1 footer1 ."
"sidebar footer2 footer2 footer2 footer2 ."
cards:
- type: custom:button-card
styles: #extra_styles fix
card:
- display: none
#################################################
# #
# SIDEBAR #
# #
#################################################
- type: vertical-stack
view_layout:
grid-area: sidebar
cards:
- type: custom:button-card
entity: sensor.template_sidebar
template: sidebar_template
#################################################
# #
# HOME #
# #
#################################################
- type: grid
title: Home
view_layout:
grid-area: home
columns: 2
cards:
- type: custom:button-card
entity: person.andre
name: André
triggers_update:
- sensor.andre_last_changed
tap_action:
!include popup/Home_Andre.yaml
hold_action:
action: none
variables:
retain: sensor.andre_last_changed
template: person
- type: custom:button-card
entity: sensor.home_mode
name: Overview
state_display: " "
tap_action:
!include popup/overview.yaml
hold_action:
action: none
template:
- base
- icon_ai
- type: custom:button-card
entity: sensor.home_occupation_scripts
#entity: automation.house_house_empty
name: Shutdown
template:
- base
- icon_away
tap_action:
action: call-service
service: automation.toggle
service_data:
entity_id: automation.house_house_empty
double_tap_action:
action: call-service
service: script.home_turn_lights_off
hold_action:
action: call-service
service: script.home_leave
state_display: >
[[[
if (states['automation.house_house_empty'].state == 'on'){
return 'Auto';
}
else {
return 'Manual';
}
]]]
- type: custom:button-card
entity: sensor.home_mode
name: Mode
tap_action:
action: call-service
service: input_boolean.toggle
service_data:
entity_id: input_boolean.guest_mode
template:
- base
- icon_home
#################################################
# #
# SECURITY #
# #
#################################################
- type: grid
title: Security
view_layout:
grid-area: security
columns: 2
cards:
- type: custom:button-card
entity: input_boolean.alarm
name: Alarm
tap_action:
action: call-service
service: input_boolean.toggle
service_data:
entity_id: input_boolean.alarm
template:
- icon_shield
- circle_state
- alarm
- type: custom:button-card
entity: sensor.doors_state
template:
- doors
- loader
- circle_state
- icon_lock
tap_action:
!include popup/doors.yaml
double_tap_action:
action: call-service
service: cover.toggle
service_data:
entity_id: cover.garage_door
- type: custom:button-card
entity: sensor.surveillance_cameras
name: Cameras
template:
- base
- icon_unifi_cam
hold_action:
!include popup/cameras.yaml
tap_action:
!include popup/cameras.yaml
state_display: >
[[[
if (variables.state == 'recording') {
return 'Online';
}
]]]
- type: custom:button-card
entity: group.motion_sensors
name: Sensors
tap_action:
!include popup/security_sensors.yaml
template:
- base
- icon_contact_sensor
- sensors
#################################################
# #
# CLIMATE #
# #
#################################################
- type: grid
title: Climate
view_layout:
grid-area: climate
columns: 2
cards:
- type: custom:button-card
entity: climate.sensibo
name: AC
tap_action:
!include popup/climate.yaml
triggers_update:
- binary_sensor.kaiteki_6600_filter_clean_required
template:
- base
- climate
- icon_climate
- type: custom:button-card
entity: cover.blind_living_room
name: Blinds
template:
- blinds
- icon_blinds
- type: custom:button-card
entity: weather.pirateweather
name: Hvittingfoss
tap_action:
!include popup/weather.yaml
template:
- base
- weather_forecast
variables:
temp_min: sensor.weather_min_temp
temp_max: sensor.weather_max_temp
current_weather: sensor.pirateweather_hourly_summary
- type: custom:button-card
entity: light.ecodim_dimmer_downlights_bathroom
name: Bathroom
template:
- base
- icon_bath_fan
#################################################
# #
# ROOMS #
# #
#################################################
- type: grid
title: Rooms
view_layout:
grid-area: rooms
columns: 2
cards:
- type: custom:button-card
entity: light.ecodim_dimmer_downlights_entrance
name: Entrance
tap_action:
!include popup/entrance.yaml
template:
- room_group
- icon_entrance
variables:
light_entity: light.ecodim_dimmer_downlights_entrance
- type: custom:button-card
entity: light.hallway_lights
name: Hallway
tap_action:
!include popup/hallway.yaml
template:
- room_group
- icon_hallway
variables:
light_entity: light.all_hallway_lights
- type: custom:button-card
entity: sensor.living_room_active
name: Living
tap_action:
!include popup/living_room.yaml
template:
- room_group
- icon_sofa
variables:
light_entity: light.ecodim_dimmer_downlights_living_room
- type: custom:button-card
entity: sensor.dining_room_active
name: Dining
tap_action:
!include popup/dining_room.yaml
template:
- room_group
- icon_dining
variables:
light_entity: light.dining_room_lights
#################################################
# #
# ROOMS 2 #
# #
#################################################
- type: grid
title: "Rooms"
view_layout:
grid-area: rooms2
columns: 2
cards:
- type: custom:button-card
entity: light.ecodim_dimmer_downlights_bathroom
name: Bathroom
tap_action:
!include popup/bathroom.yaml
template:
- room_group
- icon_colgate
variables:
light_entity: light.ecodim_dimmer_downlights_bathroom
- type: custom:button-card
entity: light.kitchen_lights
name: Kitchen
tap_action:
!include popup/kitchen.yaml
template:
- room_group
- icon_kitchen
variables:
light_entity: light.kitchen_lights
- type: custom:button-card
entity: sensor.bedroom_active
name: Bedroom
tap_action:
!include popup/bedroom.yaml
template:
- room_group
- icon_bed
variables:
light_entity: light.bedroom_lights
- type: custom:button-card
entity: sensor.office_active
name: Office
tap_action:
!include popup/office.yaml
template:
- room_group
- icon_office
variables:
light_entity: light.office_lights
#################################################
# #
# MEDIA #
# #
#################################################
- type: grid
title: Media
view_layout:
grid-area: media
columns: 1
cards:
- type: custom:swipe-card
parameters:
speed: 550
spaceBetween: 40
threshold: 5
cards:
- type: horizontal-stack
cards:
- type: conditional
conditions:
- entity: select.conditional_media
state_not: Recently Added (Offline)
- entity: select.conditional_media
state_not: Apple TV 1
- entity: select.conditional_media
state_not: Apple TV 2
- entity: select.conditional_media
state_not: SHIELD
- entity: select.conditional_media
state_not: Saga's Desktop
- entity: select.conditional_media
state_not: PC Gaming
- entity: select.conditional_media
state_not: Active Music Players
card:
type: custom:button-card
entity: sensor.recently_added_mix
name: Recently Added
template:
- conditional_media
- icon_plex
tap_action:
!include popup/footer/rss.yaml
# RECENTLY ADDED (BACKUP)
- type: conditional
conditions:
- entity: select.conditional_media
state: Recently Added (Offline)
card:
type: custom:button-card
entity: sensor.recently_added_offline
name: Recently Added (Offline)
template:
- conditional_media
- icon_plex
tap_action:
!include popup/footer/rss.yaml
# ATV 1
- type: conditional
conditions:
- entity: select.conditional_media
state: Apple TV 1
card:
type: custom:button-card
entity: media_player.apple_tv_1
template:
- conditional_media
- media_volume
- progress_bar
- icon_apple_tv
variables:
entity_picture: sensor.active_media_players
volume_control: media_player.denon_receiver
triggers_update:
- sensor.active_media_players
# ATV 2
- type: conditional
conditions:
- entity: select.conditional_media
state: Apple TV 2
card:
type: custom:button-card
entity: media_player.apple_tv_2
template:
- conditional_media
- media_volume
- progress_bar
- icon_apple_tv
variables:
entity_picture: sensor.active_media_players
volume_control: media_player.sonos_arc
triggers_update:
- sensor.active_media_players
# SONOS
- type: conditional
conditions:
- entity: select.conditional_media
state: Active Music Players
card:
type: custom:button-card
entity: sensor.active_music_players
name: SONOS
template:
- conditional_media
- media_volume
- icon_sonos
styles:
custom_fields:
icon:
- fill: >
[[[
return variables.state === 'playing' ? '#2a2a2a' : '#9da0a2';
]]]
# SHIELD
- type: conditional
conditions:
- entity: select.conditional_media
state: SHIELD
card:
type: custom:button-card
entity: sensor.shield_real_state
template:
- conditional_media
- media_volume
- progress_bar
- icon_nvidia_shield
variables:
player: '[[[ return states[entity.entity_id].attributes.player; ]]]'
entity_picture: sensor.active_media_players
volume_control: media_player.denon_receiver
triggers_update:
- sensor.active_media_players
# DESKTOP
- type: conditional
conditions:
- entity: select.conditional_media
state: Saga's Desktop
card:
type: custom:button-card
entity: sensor.active_media_players
name: Saga's Desktop
template:
- conditional_media
- media_volume
- progress_bar
- icon_plex
variables:
entity_picture: sensor.active_media_players
volume_control: media_player.sagasdesktop
player: media_player.sagasdesktop
# DESKTOP GAMING
- type: conditional
conditions:
- entity: select.conditional_media
state: PC Gaming
card:
type: custom:button-card
entity: sensor.office_pc_media_state
name: PC Gaming
template:
- conditional_media
- icon_win11
#- icon_pc_gaming
# SWIPE CARD - 2nd PAGE
- type: grid
columns: 2
cards:
- type: custom:button-card
entity: media_player.apple_tv_1
name: ATV 1
template:
- media
- atv
- media_volume
- icon_apple_tv
variables:
player: '[[[ return states["sensor.active_media_players"].attributes.active; ]]]'
volume_control: media_player.denon_receiver
- type: custom:button-card
entity: media_player.apple_tv_2
name: ATV 2
template:
- media
- atv
- media_volume
- icon_apple_tv
variables:
volume_control: media_player.apple_tv_2
- type: custom:button-card
entity: sensor.active_music_players
name: SONOS
template:
- sonos
- media_volume
- icon_sonos
- type: custom:button-card
entity: sensor.shield_real_state
name: SHIELD
template:
- media
- media_volume
- icon_nvidia_shield
variables:
player: '[[[ return states["sensor.active_media_players"].attributes.active; ]]]'
volume_control: media_player.denon_receiver
#################################################
# #
# CAMERAS #
# #
#################################################
- type: grid
title: Cameras
view_layout:
grid-area: cameras
columns: 1
cards:
- type: custom:swipe-card
parameters:
speed: 550
spaceBetween: 40
threshold: 5
cards:
- type: grid
columns: 2
cards:
- type: custom:button-card
entity: camera.driveway
name: " "
triggers_update:
- select.camera_night_vision_entrance
template:
- camera
- icon_unifi_cam
tap_action:
!include popup/camera_single.yaml
- type: custom:button-card
entity: camera.doorbell
name: " "
triggers_update:
- select.camera_night_vision_doorbell
template:
- camera
- icon_unifi_doorbell
tap_action:
!include popup/camera_single.yaml
- type: custom:button-card
entity: camera.living_room
name: " "
triggers_update:
- select.camera_night_vision_living_room
template:
- camera
- icon_unifi_cam
tap_action:
!include popup/camera_single.yaml
- type: custom:button-card
entity: camera.terrace
name: " "
triggers_update:
- select.camera_night_vision_terrace
template:
- camera
- icon_unifi_cam
tap_action:
!include popup/camera_single.yaml
- type: horizontal-stack
cards:
- type: conditional
conditions:
- entity: input_select.conditional_camera
state: Driveway
card:
type: custom:button-card
entity: camera.driveway
tap_action:
action: none
template:
- conditional_camera
- type: conditional
conditions:
- entity: input_select.conditional_camera
state: Doorbell
card:
type: custom:button-card
entity: camera.doorbell
template:
- conditional_camera
- type: conditional
conditions:
- entity: input_select.conditional_camera
state: Living-room
card:
type: custom:button-card
entity: camera.living_room
template:
- conditional_camera
- type: conditional
conditions:
- entity: input_select.conditional_camera
state: Terrace
card:
type: custom:button-card
entity: camera.terrace
template:
- conditional_camera
#################################################
# #
# SECTIONS #
# #
#################################################
- type: grid
title: Sections
view_layout:
grid-area: outside
columns: 2
cards:
- type: custom:button-card
entity: light.ecodim_dimmer_downlights_entrance
name: Outside
template:
- base
- icon_tree
- type: custom:button-card
entity: light.lights_upstairs
name: Upstairs
template:
- room_group
- icon_stairs_up
tap_action:
!include popup/upstairs.yaml
variables:
light_entity: light.lights_upstairs
- type: custom:button-card
entity: cover.garage_door
name: Garage
template:
- base
- loader
- icon_garage
tap_action:
!include popup/garage.yaml
double_tap_action:
action: call-service
service: cover.toggle
service_data:
entity_id: cover.garage_door
- type: custom:button-card
entity: light.ecodim_dimmer_ceiling_downstairs
name: Basement
template:
- room_group
- icon_stairs_down
#################################################
# #
# FOOTER1 #
# #
#################################################
- type: horizontal-stack
view_layout:
grid-area: footer1
cards:
# HOME ASSISTANT
- type: custom:button-card
name: >
<ha-icon icon="mdi:home"></ha-icon> Home Assistant
tap_action:
!include popup/footer/hass.yaml
template: footer
# TABLET
- type: custom:button-card
name: >
<ha-icon icon="mdi:tablet"></ha-icon> Tablet
tap_action:
!include popup/footer/tablet.yaml
variables:
notify: >
[[[
let plugged_in = states['binary_sensor.galaxy_tab_a_plugged_in'];
if (plugged_in) {
return plugged_in.state === 'off';
}
]]]
template: footer
# UPDATES
- type: custom:button-card
entity: sensor.template_updates
name: >
<ha-icon icon="mdi:arrow-up-bold-circle-outline"></ha-icon> Updates
tap_action:
!include popup/footer/updates.yaml
variables:
notify: >
[[[
return parseInt(entity?.state);
]]]
template: footer
# ELECTRICAL
- type: custom:button-card
name: >
<ha-icon icon="mdi:transmission-tower"></ha-icon> Electrical
tap_action:
!include popup/footer/power.yaml
template: footer
# NAS
- type: custom:button-card
name: >
<ha-icon icon="mdi:server-network"></ha-icon> NAS
tap_action:
!include popup/footer/nas.yaml
triggers_update:
- binary_sensor.ping_rackstation
- sensor.rackstation_volume_1_status
- update.rackstation_dsm_update
- sensor.rackstation_volume_used
- sensor.diskstation_volume_1_status
- sensor.diskstation_volume_1_volume_used
variables: # return upgradable.state === 'on'
notify: >
[[[
let id = this._config.triggers_update;
if (id.every(e => states[e]))
return states[id[0]].state === 'off'
? '!'
: states[id[1]].state === 'background_scrubbing' ||
states[id[2]].state === 'on' ||
parseFloat(states[id[3]].state) >= 90;
]]]
template: footer
# NETWORK
- type: custom:button-card
name: >
<ha-icon icon="custom:eth-jack"></ha-icon> Network
tap_action:
!include popup/footer/network.yaml
double_tap_action:
!include popup/footer/network_wifi_qr.yaml
variables:
notify: >
[[[
let health = states['sensor.unifi_be_health'];
if (health) {
return health.state === 'off';
}
]]]
template: footer
# PLEX
- type: custom:button-card
name: >
<ha-icon icon="mdi:plex"></ha-icon> Plex
tap_action:
!include popup/footer/plex.yaml
hold_action:
!include popup/footer/rss.yaml
variables:
notify: >
[[[
let ping = states['binary_sensor.ping_rackstationmedia_volume'];
if (ping) {
return ping.state === 'off';
}
]]]
template: footer
# PC
- type: custom:button-card
name: >
<ha-icon icon="custom:win11"></ha-icon> PC
tap_action:
!include popup/office_pc.yaml
variables:
notify: >
[[[
let ping = states['switch.wake_on_lan'].state,
firewall = states['sensor.pc_firewall_settings'].state;
if (ping && firewall) {
return firewall === 'blocked'
? 1
: 0
}
]]]
template: footer
#################################################
# #
# FOOTER2 #
# #
#################################################
- type: custom:button-card
view_layout:
grid-area: footer2
entity: sensor.rss_search_result
template: rss_footer
variables:
tv_show: sensor.rss_search_result_tv_shows
tv_show_downloaded: sensor.torrent_tv_show_already_downloaded
movie_downloaded: sensor.torrent_movie_already_downloaded
radarr: sensor.radarr_rss_search_result
tap_action:
!include popup/footer/rss.yaml
triggers_update:
- sensor.rss_search_result_tv_shows
- sensor.radarr_rss_search_result
- sensor.torrent_tv_show_already_downloaded