-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui-tablet2.yaml
1218 lines (1110 loc) · 74.3 KB
/
ui-tablet2.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
##########################################################################
# #
# * SETTINGS * #
# #
##########################################################################
anchors:
⚓₁: &title
entity: sensor.placeholder
tap_action:
action: none
hold_action:
action: none
type: state-label
⚓₂: &title-style
color: "#bcbebf"
font-family: SF Text
font-size: 2.4vw
font-weight: 500
max-width: 1px
cursor: default
button_card_templates: !include button_card_templates.yaml
##########################################################################
# #
# * LOVELACE * #
# #
##########################################################################
title: Hjem
views:
- panel: true
path: default_view
cards:
- type: picture-elements
image: /local/background.png
elements:
# markdown fix
- type: custom:hui-element
card_type: markdown
style: { opacity: 0 }
content: preload
#################################################
# #
# COVID-19 #
# #
#################################################
# - type: custom:hui-markdown-card
# class: coronavirus
# style: { top: 93.65%, left: 70.2% }
# content: >
# {% if is_state('sensor.covid_19_folkhalsomyndigheten', 'Tillgänglig') %}
# {% set data = state_attr('sensor.covid_19_folkhalsomyndigheten', 'embedCode') %}
# {% set total = data | regex_findall_index('Totalt[^,]*?(\d+)[^,]*?(\d+)[^,]*?(\d+)') | list %}
# {% set break = ' <font color="#2f3436">|</font> ' %}
# <font color='#6a7377'>
# <ha-icon icon="mdi:virus"></ha-icon> <b>Coronavirus</b>{{ break -}}
# <ha-icon icon="mdi:chart-bar"></ha-icon> <b>{{ ((total[0] | int / 10327589) * 100) | round(2) }}%</b> av Sverige{{ break -}}
# <ha-icon icon="mdi:emoticon-sad"></ha-icon> <b>{{ total[0] }}</b> fall{{ break -}}
# <ha-icon icon="mdi:grave-stone"></ha-icon> <b>{{ total[2] }}</b> avlidna{{ break -}}
# <ha-icon icon="mdi:map-marker-radius"></ha-icon> <b>{{ data | regex_findall_index('Skåne[^,]*?(\d+)') }}</b> fall i Skåne
# </font>
# {% endif %}
- type: custom:hui-markdown-card
class: coronavirus
style: { top: 93.65%, left: 70.2% }
content: >
{% if is_state('sensor.norway_coronavirus_current',
'unavailable') %} {% else %}
<font color='#6a7377'>
<b><ha-icon icon="custom:corona-virus"></ha-icon> <b>Coronavirus</b>
<font color='#2f3436'>|</font>
<b><ha-icon icon="mdi:emoticon-sad"></ha-icon>
{{ states('sensor.norway_coronavirus_current') }}</b> smittede
<font color='#2f3436'>|</font>
<ha-icon icon="mdi:chart-bar"></ha-icon>
<b>{{ ((states('sensor.norway_coronavirus_confirmed')
| int / 5414135 ) * 100) | round(2) }}%</b> av Norge </font>
<font color='#2f3436'>|</font>
<b><ha-icon icon="mdi:emoticon-happy"></ha-icon>
{{ states('sensor.norway_coronavirus_recovered') }}</b> friskmeldt
<font color='#2f3436'>|</font>
<b><ha-icon icon="mdi:grave-stone"></ha-icon>
{{ states('sensor.norway_coronavirus_deaths') }}</b> døde
{% endif %}
##########################################################################
# #
# * SIDEBAR * #
# #
##########################################################################
- type: image
image: local/sidebar.png
tap_action:
action: none
hold_action:
action: none
style:
{
top: 49.24%,
left: 10.6%,
width: 21.5%,
pointer-events: none,
border-right: "1.5px solid rgba(58,69,73,0.2)",
}
#################################################
# #
# MARKDOWN #
# #
#################################################
- type: custom:hui-markdown-card
class: sidebar
style: { top: 9%, left: 11.1% }
content: >
<span>{{ now().strftime('%H') }}<span>:</span>{{ now().strftime('%M') }}</span>
<font color='#6a7377'><b>{{ states('sensor.dag') }}</b><br>
<b>{{ states('sensor.dato') }}</b> </font><br>
<b>{{ states('sensor.sidebar_greeting') }}</b>
<b>{{ states('sensor.sidebar_active') }}</b>
<font color='#6a7377'>
<b>{{ states('sensor.sidebar_vacuum') }}</b>
{{ states('sensor.sidebar_weather') }}
{{ states('sensor.sidebar_buss') }}
{% if is_state('binary_sensor.plex_availability', 'off') %}
{{'\u26A0\uFE0F'}} Plex är nere...{% endif %}
{% if is_state('binary_sensor.nas_internet_access', 'off') %}
{{'\u26A0\uFE0F'}} Kontrollera NAS internetåtkomst{% endif %}
</font>
#################################################
# #
# KRISINFORMATION #
# #
#################################################
# - type: conditional
# conditions:
# - entity: input_boolean.krisinformation_visibility
# state: "on"
# elements:
# - type: custom:stack-in-card
# class: krisinformation
# style:
# {
# top: 18%,
# left: 10.7%,
# height: 1px,
# max-height: 4vw,
# width: 17.5vw,
# }
# cards:
# - type: custom:hui-element
# card_type: markdown
# style: "ha-card {padding: 0.6vw;}"
# content: >
# {% set entity_id = 'sensor.krisinformation_sverige' %}
# {% if not is_state_attr(entity_id, 'messages', []) %}
# {{'\u26A0\uFE0F'}} <b>Krisinformation</b><br>
# {{ as_timestamp(state_attr(entity_id,
# 'messages')[0]["Published"]) | timestamp_custom('%Y-%m-%d') }}. {{ state_attr(entity_id,
# 'messages')[0]["Message"] | truncate(280, True, '...', 0) }}
# {% endif %}
# - type: custom:button-card
# show_label: true
# label: OK
# tap_action:
# action: call-service
# service: input_boolean.turn_off
# service_data:
# entity_id: input_boolean.krisinformation_visibility
# styles:
# label:
# [
# font-size: 1.5vw,
# background: "#FFFFFF15",
# border-radius: 0.6vw,
# font-weight: 500,
# letter-spacing: 0.09vw,
# opacity: 0.65,
# padding: 0.7vw 1vw 0.8vw 1vw,
# font-family: SF Display,
# ]
# card:
# [
# width: 4.5vw,
# height: 6vw,
# margin-top: -0.5vw,
# padding-bottom: 1vw,
# margin-left: 138%,
# --mdc-ripple-press-opacity: 0,
# ]
#################################################
# #
# LAUNDRY TIMER #
# #
#################################################
# - type: conditional
# conditions:
# - entity: input_boolean.laundry_timer_visibility
# state: "on"
# elements:
# - type: custom:button-card
# entity: timer.laundry
# show_icon: false
# show_name: false
# show_state: true
# tap_action:
# services: |
# [[[ hass.callService('timer', 'cancel', {entity_id: 'timer.laundry'});
# hass.callService('timer', 'start', {entity_id: 'timer.laundry'}); ]]]
# hold_action:
# services: |
# [[[ hass.callService('timer', 'cancel', {entity_id: 'timer.laundry'});
# hass.callService('input_boolean', 'turn_off', {entity_id: 'input_boolean.laundry_timer_visibility'}); ]]]
# styles:
# card:
# [
# background: "#202a2f30",
# border-radius: 0.7vw,
# box-shadow: none,
# border: "0.2vw solid #292c2e",
# ]
# state:
# [
# font-size: 2.7vw,
# font-family: SF person2o,
# opacity: 0.65,
# padding: 0.55vw 1.2vw 0.5vw 1.2vw,
# ]
# style:
# top: 77%
# left: 10.7%
# font-size: 1.6vw
#################################################
# #
# MEATER BUTTON #
# #
#################################################
- type: icon
icon: mdi:fire
title: Meater Info
style:
top: 77.41%
left: 10.7%
color: rgb(255, 255, 255)
opacity: 0.1
padding: 0.8vw
--mdc-icon-size: 4vw
tap_action: !include popup/sidebar_meater.yaml
#################################################
# #
# VACUUM BUTTON #
# #
#################################################
- type: icon
icon: custom:roborock-vacuum
title: Støvsuger
style:
top: 87.41%
left: 4.8%
color: rgb(255, 255, 255)
opacity: 0.1
padding: 0.8vw
--mdc-icon-size: 4vw
tap_action: !include popup/sidebar_vacuum.yaml
#################################################
# #
# INFO BUTTON #
# #
#################################################
- type: icon
icon: mdi:information-outline
title: Informasjon
style:
top: 87.41%
left: 10.7%
color: rgb(255, 255, 255)
opacity: 0.1
padding: 0.8vw
--mdc-icon-size: 4vw
tap_action: !include popup/sidebar_information.yaml
#################################################
# #
# UPDATES BUTTON #
# #
#################################################
- type: icon
icon: mdi:arrow-up-bold-circle-outline
title: Oppdateringer
style:
top: 87.41%
left: 16.55%
color: rgb(255, 255, 255)
opacity: 0.1
padding: 0.8vw
--mdc-icon-size: 4vw
tap_action: !include popup/sidebar_update.yaml
##########################################################################
# #
# * VARDAGSRUM * #
# #
##########################################################################
- prefix: Stue
<<: *title
style:
top: 9.15%
left: 25.4%
<<: *title-style
#################################################
# #
# BELYSNING #
# #
#################################################
- type: custom:button-card
entity: light.stue
style:
top: 20.35%
left: 30.31%
width: 10%
custom_fields:
icon_hue: &icon_hue >
[[[ const state = entity.state === 'on' ? 'animate' : null;
return `<svg viewBox="0 0 50 50"><style>@keyframes animate{0%{transform: scale(0.85);}20%{transform: scale(1.1);}40%{transform: scale(0.95);}60%{transform: scale(1.03);}80%{transform: scale(0.97);}100%{transform: scale(1);}}.animate{animation: animate 0.8s; transform-origin: center;}</style>
<path fill="#9da0a2" d="M27.4 47.3h-4.9s-.7.1-.7.8.4.9.7.9h4.9c.3 0 .7-.1.7-.9s-.7-.8-.7-.8zm3.3-2.9H19.3s-.8 0-.8.8.6.9.8.9h11.5c.2 0 .8-.1.8-.9-.1-.8-.9-.8-.9-.8zm0-3H19.3s-.8 0-.8.8.6.9.8.9h11.5c.2 0 .8-.1.8-.9-.1-.8-.9-.8-.9-.8zm0-2.9H19.3s-.8 0-.8.8.6.9.8.9h11.5c.2 0 .8-.1.8-.9s-.9-.8-.9-.8zm5.2-23.2c-3.3-5.3-7-5.6-10.9-5.6-3.8 0-8.4.4-10.9 5.6-.1.1-.1.3.1.7.4.8 3.3 7.2 3.2 18.8 0 1.1-.1 1.6 0 1.7 0 .1 0 .7 1.1.7h13c1 0 1-.5 1.1-.7v-1.7c-.1-11.6 2.8-18 3.2-18.8.1-.4.1-.5.1-.7"/>
<path class="${state}" fill="var(--button-card-light-color-no-temperature)" d="M14.1 15.3c3.4-.3 7-.4 10.9-.4 3.8 0 7.5.2 10.9.4.4-.4.7-.8.9-1.1C39 8.5 38.9 6.5 38.9 6c-.2-4.4-8.4-5-12.1-5h0-3.4c-3.7 0-12 .5-12.1 5 0 .5-.1 2.5 2.1 8.2 0 .3.3.8.7 1.1z"/></svg>`; ]]]
styles: &icon_hue_styles
custom_fields:
icon_hue:
[
top: 11%,
left: 4.5%,
width: 3.05vw,
position: absolute,
]
template: light
#################################################
# #
# SKRIVBORD #
# #
#################################################
- type: custom:button-card
entity: light.livingroom
name: Tv & Vindu
style:
top: 20.35%
left: 41.31%
width: 10%
custom_fields:
icon_shade: >
[[[ const state = entity.state === 'on' ? 'animate' : null;
return `<svg viewBox="0 0 50 50"><style>@keyframes animate{0%{transform: scale(0.85);}20%{transform: scale(1.1);}40%{transform: scale(0.95);}60%{transform: scale(1.03);}80%{transform: scale(0.97);}100%{transform: scale(1);}}.animate{animation: animate 0.8s; transform-origin: center;}</style>
<path fill="#9da0a2" d="M26.4 25.6c.6-.3 1.1-.7 1.1-1.3L25 17.9l-2.5 6.4c0 .7.6 1.1 1.1 1.3v20.8h-5.5v2.7h13.7v-2.7h-5.5V25.6z"/>
<path class="${state}" fill="var(--button-card-light-color-no-temperature)" d="M24.6.9l-9.4.5c-.6.1-1.9 0-2.5 2.1s-2.4 9.1-4 16.9c-.2.7-.5 2-.5 2.3s-.4 1.6.9 1.6c.8.1 7.4.3 15.9.3 8.6 0 15.1-.3 15.9-.3 1.3-.1.9-1.3.9-1.6s-.3-1.6-.5-2.3c-1.6-7.8-3.4-14.8-4-16.9s-1.9-2-2.5-2.1c-1.6-.2-6.9-.4-9.4-.5"/> </svg>`;]]]
styles:
custom_fields:
icon_shade:
[
top: 11%,
left: 4.6%,
width: 3.05vw,
position: absolute,
]
template: light
#################################################
# #
# TV #
# #
#################################################
- type: custom:button-card
entity: binary_sensor.tv
name: TV
triggers_update: ["binary_sensor.tv", "input_boolean.tv"]
style:
top: 37.9%
left: 30.31%
width: 10%
# tap_action: &tv_tap_action
# services: |
# [[[ if (entity.state === 'off') {
# hass.callService('input_boolean', 'turn_on', {entity_id: entity.entity_id.replace(entity.entity_id.split('.')[0], 'input_boolean')});
# hass.callService('media_player', 'turn_on', {entity_id: entity.entity_id}); }
# if (entity.state === 'on') {
# hass.callService('input_boolean', 'turn_on', {entity_id: entity.entity_id.replace(entity.entity_id.split('.')[0], 'input_boolean')});
# hass.callService('media_player', 'turn_off', {entity_id: entity.entity_id});
# hass.callService('media_player', 'turn_off', {entity_id: entity.entity_id.replace('the_frame_75', 'stue').replace('samsung_tv_remote', 'soverom')}); } ]]]
hold_action: !include popup/vardagsrum_tv.yaml
custom_fields:
icon_tv: &icon_tv >
[[[ var fill_color = entity.state === 'on' ? '#616161' : '#9da0a2';
var gradient = entity.state === 'on' ? '<linearGradient id="A" gradientUnits="userSpaceOnUse" x1="5.401" y1="34.714" x2="43.817" y2="11.74"><stop offset="0" stop-color="#64acb7"/><stop offset="1" stop-color="#7fdbe9"/></linearGradient><path d="M2.9,8h44.3v29.9H2.9V8z" fill="url(#A)"/>' : ' ';
return '<svg viewBox="0 0 50 50">' + gradient + '<path d="M46 9.2v27.5H4.1V9.2H46m2.4-2.4H1.6v32.3h46.7c.1 0 .1-32.3.1-32.3zM11.9 43.2h26.3c.6 0 1.1-.4 1.1-1v-.3c0-.6-.4-1.1-1-1.1H11.9c-.6 0-1.1.4-1.1 1v.3a1.11 1.11 0 0 0 1.1 1.1z" fill="' + fill_color + '"/></svg>'; ]]]
styles: &icon_tv_styles
custom_fields:
icon_tv:
[
fill: "[[[ return entity.state === 'on' ? '#616161' : '#9da0a2'; ]]]",
top: 7%,
left: 10.7%,
width: 3.5vw,
position: absolute,
]
template: ["base"]
#################################################
# #
# SPISEBORD #
# #
#################################################
- type: custom:button-card
entity: light.kitchen_dimmer_2_instance_1_level_3
name: Spisebord
style:
top: 37.9%
left: 41.31%
width: 10%
custom_fields:
icon_spot: &icon_spot >
[[[ const state = entity.state === 'on' ? 'animate_on' : 'animate_off';
return `<svg viewBox="0 0 50 50"><style>@keyframes animate_on{0%{transform: rotateZ(0deg); animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);}70%{transform: rotateZ(-15deg); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);}75%{transform: rotateZ(-15deg); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);}88%{transform: rotateZ(-11deg);}100%{transform: rotateZ(-15deg);}}.animate_on{animation: animate_on 0.7s; transform-origin: 40% 20%; animation-fill-mode: forwards; animation-delay: -0.1s;}@keyframes animate_off{0%{transform: rotateZ(-15deg); animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);}70%{transform: rotateZ(0deg); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);}75%{transform: rotateZ(0deg); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);}88%{transform: rotateZ(-4deg);}100%{transform: rotateZ(0deg);}}.animate_off{animation: animate_off 0.7s; transform-origin: 40% 20%; animation-fill-mode: forwards;}</style>
<path style="clip-path: url(#mask);" fill="#9da0a2" d="M40.5.8H17.1c-.1 0-.1 0-.1.1A3.12 3.12 0 0 0 20.1 4h6.1c.1 0 .1 0 .1.1v7.4L18 19.1l3.6 3.5 9.1-8.6c.4-.4.6-1 .7-1.6V4c0-.1 0-.1.1-.1h6c1.7.1 3.1-1.3 3-3.1z"/><defs><clipPath id="mask"><path class="${state}" d="M0 9.1h24l8.3 8.8H50V-9H0z"/></clipPath></defs><path class="${state}" fill="var(--button-card-light-color-no-temperature)" d="M25.5 46.4s1.4.5 10.4-8.2c.5-.4 6.3-6.3 5.8-7.1-.7-.8-18.6-19.5-18.6-19.5s-.6-.9-8.6 6.4c-.6.5-8.7 8-7.7 9.1l18.7 19.3z"/></svg>`; ]]]
styles: &icon_spot_styles
custom_fields:
icon_spot:
[
top: 7%,
left: 10%,
width: 3.5vw,
position: absolute,
]
template: light
##########################################################################
# #
# * STUDIO * #
# #
##########################################################################
- prefix: Kontor
<<: *title
style:
top: 9.15%
left: 50.2%
<<: *title-style
#################################################
# #
# DATORLAMPA #
# #
#################################################
- type: custom:button-card
entity: light.computer
name: Hue Iris
style:
top: 20.35%
left: 55.18%
width: 10%
custom_fields:
icon_hue: *icon_hue
styles: *icon_hue_styles
template: light
#################################################
# #
# TAKLAMPOR #
# #
#################################################
- type: custom:button-card
entity: light.kontoret_taklampe
name: Taklampe
style:
top: 20.35%
left: 66.14%
width: 10%
custom_fields:
icon_spot: *icon_spot
styles: *icon_spot_styles
template: light
#################################################
# #
# PC #
# #
#################################################
- type: custom:button-card
entity: switch.wol_office_pc
triggers_update:
[
"switch.wol_office_pc",
"input_boolean.pc",
"input_boolean.lock_computer",
]
style:
top: 37.9%
left: 55.18%
width: 10%
tap_action:
action: toggle
hold_action: !include popup/studio_dator.yaml
custom_fields:
icon_imac: >
[[[ const state = entity.state === 'on' ? 'animate' : null;
return `<svg viewBox="0 0 50 50"><style>@keyframes animate{from{opacity: 0.5; transform: scale(0.6);}100%{opacity: 1;}}.animate{animation: animate 0.8s cubic-bezier(0.25, 1, 0.5, 1); transform-origin: center;}</style>
<path class="${state}" d="M31.9 44.5c-1-.3-1.9.4-1.9-3.7h-9.9c0 4.2-.9 3.4-1.9 3.7s-.2.7-.2.7h14.1s.8-.3-.2-.7zM47.6 4.8H2.5c-1.1 0-2 .9-2 2v30.1c0 1.1.9 2 2 2h45c1.1 0 2-.9 2-2v-30a1.95 1.95 0 0 0-1.9-2.1zm-.7 26.4H3.2V7.6H47v23.6z"/></svg>`; ]]]
styles:
custom_fields:
icon_imac:
[
fill: "[[[ return entity.state === 'on' ? '#72757c' : '#9da0a2'; ]]]",
top: 8.5%,
left: 11%,
width: 3.3vw,
position: absolute,
]
template: ["base"]
#################################################
# #
# VIFTE #
# #
#################################################
- type: custom:button-card
entity: fan.office
name: Vifte
triggers_update: ["fan.office, input_boolean.office"]
style:
top: 37.9%
left: 66.14%
width: 10%
tap_action:
action: toggle
hold_action: !include popup/studio_flakt.yaml
custom_fields:
icon_fan: >
[[[ const boolean = states[entity.entity_id.replace(entity.entity_id.split('.')[0], 'input_boolean')].state;
const style = '<svg viewBox="0 0 50 50"> <style>@keyframes rotate{0%{visibility:visible;transform:rotate(0deg)}100%{transform:rotate(1080deg)}}.start{animation:rotate 2.8s ease-in;transform-origin:center;fill:#5daeea;visibility:hidden}.on_delay{animation:rotate 1.8s linear infinite;transform-origin:center;fill:#5daeea;animation-delay:2.8s;visibility:hidden}.on{animation:rotate 1.8s linear infinite;transform-origin:center;fill:#5daeea;visibility:hidden}.end{animation:rotate 2.8s;transform-origin:center;fill:#9ca2a5;animation-timing-function:cubic-bezier(.61,1,.88,1)}</style>';
const path = '<circle cx="25" cy="25" r="6.6"/> <path d="M31.9 30.4c-.5.6-1.1 1.1-1.7 1.5-1.4 1.1-3.2 1.7-5.2 1.7-2.3 0-4.5-.9-6-2.4-.9 1.1-1.6 2.3-2.3 3.2l-4.9 5.4c-1.8 2.7.3 5.6 2.5 7 3.9 2.4 9.8 3.1 14.1 1.9 4.6-1.3 7.9-4.7 7.4-9.7-.2-3.4-1.9-6-3.9-8.6zM17 28.3c-.4-1-.6-2.1-.6-3.3a8.7 8.7 0 0 1 6.4-8.4l-1.6-3.5L19 6.2c-1.5-2.8-5-2.5-7.3-1.2-4 2.2-7.5 6.9-8.7 11.3-1.2 4.6.2 9.2 4.7 11.3 3.1 1.3 6.1 1.2 9.3.7zm26.9-17.6c-3.3-3.4-8-4.6-12.1-1.8-2.8 1.8-4.2 4.6-5.5 7.5 4.2.6 7.4 4.2 7.4 8.6 0 .9-.1 1.7-.4 2.5 1.3.2 2.8.3 3.8.4 2.3.4 4.7 1.3 7.1 1.7 3.2.3 4.7-3 4.8-5.6.3-4.6-1.9-10.1-5.1-13.3z"/>';
if (entity.state === 'off' && boolean === 'off') { return `${style}<g class="end">${path}</g></svg>`; }
if (entity.state === 'on' && boolean === 'off') { return `${style}<g class="start">${path}</g><g class="on_delay">${path}</g></svg>`; }
if (entity.state === 'on' && boolean === 'on') { return `${style}<g class="on">${path}</g></svg>`; }
else if (entity.state==='off' && boolean==='on') { return `${style}<g fill="#9ca2a5">${path}</g></svg>`; } ]]]
styles:
custom_fields:
icon_fan:
[
top: 9%,
left: 10%,
width: 3vw,
position: absolute,
]
template: ["base", "loader"]
##########################################################################
# #
# * SOVEROM * #
# #
##########################################################################
- prefix: Soverom
<<: *title
style:
top: 9.15%
left: 75.1%
<<: *title-style
#################################################
# #
# TAKLAMPE #
# #
#################################################
- type: custom:button-card
entity: light.bedroom
name: Taklampe
style:
top: 20.35%
left: 80.05%
width: 10%
custom_fields:
icon_spot: *icon_spot
styles: *icon_spot_styles
template: light
#################################################
# #
# AIR PURIFIER #
# #
#################################################
# - type: custom:button-card
# entity: switch.air_purifier
# triggers_update:
# ["switch.air_purifier", "input_boolean.air_purifier"]
# style:
# top: 20.35%
# left: 91.05%
# width: 10%
# tap_action:
# action: toggle
# hold_action: !include popup/sovrum_luftrenare.yaml
# custom_fields:
# icon_air_purifier: >
# <svg viewBox="0 0 50 50"><path d="M36.8 1.2v1.7a5.34 5.34 0 0 1-5.3 5.3H18.4a5.34 5.34 0 0 1-5.3-5.3V1.2c-2.6.4-4.7 2.8-4.7 5.6v36.5c0 3.1 2.6 5.7 5.7 5.7h21.8c3.1 0 5.7-2.6 5.7-5.7V6.8c0-2.8-2.1-5.2-4.8-5.6zm-1.7 35.6c-.2 0-.4 0-.5-.1-.4-.1-1.2-.2-2.4-.6-.5-.2-.8-.3-1.2-.4-.3-.1-.7-.3-1.4-.5-1-.4-1.5-.5-1.9-.6-.5-.1-1.1-.2-1.9-.2s-1.4.2-1.9.4c-1 .3-1.8.7-2.1.9l-.6.3a9.75 9.75 0 0 1-1.4.6c-.3.1-.9.3-1.6.3h-.3c-.4 0-1 0-2-.2-.3-.1-.6-.1-.8-.2v-2.7l1.3.3c.5.1 1.3.2 1.7.2.5 0 .9-.2 1.1-.2.4-.1.6-.2 1-.4.2-.1.4-.2.7-.4.4-.2 1.3-.7 2.5-1 .6-.2 1.4-.4 2.5-.5s2 .1 2.5.2c.6.1 1.2.3 2.2.7l1.5.5c.3.1.6.2 1 .4 1 .3 1.8.5 2.1.5h.1v2.7zm0-6c-.2 0-.4 0-.5-.1-.4-.1-1.2-.2-2.4-.6-.5-.2-.8-.3-1.2-.4-.3-.1-.7-.3-1.4-.5-1-.4-1.5-.5-1.9-.6-.5-.1-1.1-.2-1.9-.2s-1.4.2-1.9.4c-1 .3-1.8.7-2.1.9l-.6.3a9.75 9.75 0 0 1-1.4.6c-.3.1-.9.3-1.6.3h-.3c-.4 0-1 0-2-.2-.3-.1-.6-.1-.8-.2v-2.7l1.3.3c.5.1 1.3.2 1.7.2.5 0 .9-.2 1.1-.2.4-.1.6-.2 1-.4.2-.1.4-.2.7-.4.4-.2 1.3-.7 2.5-1 .6-.2 1.4-.4 2.5-.5s2 .1 2.5.2c.6.1 1.2.3 2.2.7l1.5.5c.3.1.6.2 1 .4 1 .3 1.8.5 2.1.5h.1v2.7zm0-6c-.2 0-.4 0-.5-.1-.4-.1-1.2-.2-2.4-.6-.5-.2-.8-.3-1.2-.4-.3-.1-.7-.3-1.4-.5-1-.4-1.5-.5-1.9-.6-.5-.1-1.1-.2-1.9-.2s-1.4.2-1.9.4c-1 .3-1.8.7-2.1.9l-.6.3c-.4.2-.8.4-1.4.6-.3.1-.9.3-1.6.3h-.3c-.4 0-1 0-2-.2-.3-.1-.6-.1-.8-.2v-2.7l1.3.3c.5.1 1.3.2 1.7.2.5 0 .9-.2 1.1-.2.4-.1.6-.2 1-.4.2-.1.4-.2.7-.4.4-.2 1.3-.7 2.5-1 .6-.2 1.4-.4 2.5-.5s2 .1 2.5.2c.6.1 1.2.3 2.2.7l1.5.5c.3.1.6.2 1 .4 1 .3 1.8.5 2.1.5h.1v2.7zM15.7 1.9v-.8h18.6V3c0 1.5-1.2 2.8-2.8 2.8H18.4c-1.5 0-2.8-1.2-2.8-2.8V1.9z"/></svg>
# styles:
# custom_fields:
# icon_air_purifier:
# [
# top: 11%,
# left: 6.3%,
# width: 3.05vw,
# position: absolute,
# fill: "[[[ return entity.state === 'on' ? '#5daeea' : '#9da0a2'; ]]]",
# ]
# template: ["base", "loader"]
- type: custom:button-card
entity: light.nightstand_person1
name: Nattbord
style:
top: 20.35%
left: 91.05%
width: 10%
custom_fields:
icon_lamp: &icon_lamp >
[[[ const state = entity.state === 'on' ? 'animate' : null;
return `<svg viewBox="0 0 50 50"><style>@keyframes animate{0%{transform: scale(0.85);}20%{transform: scale(1.1);}40%{transform: scale(0.95);}60%{transform: scale(1.03);}80%{transform: scale(0.97);}}.animate{animation: animate 0.8s; transform-origin: center;}</style>
<path fill="#9da0a2" d="M26.5 21.8l3.8-6.1H19.7l3.8 6.1c-5 .7-6.3 5.8-5.7 10.2.7 5.1 3.2 10.1 5.7 14.4H19v2.5h11.8v-2.5h-4.5C29 42 31.4 37 32.1 32c.6-4.4-.6-9.4-5.6-10.2zm3.1 9.1c-.3 4.3-2.3 8.7-4.4 12.4l-.2.1v.1-.1c-1.8-3-3.3-6.4-4.1-9.7-.7-3.1-1-7.2 2.7-8.4 1.4-.5 3.1-.1 4.2.8 1.6 1 1.8 3 1.8 4.8z"/>
<path class="${state}" fill="var(--button-card-light-color-no-temperature)" d="M38.1 20L35.7 3.8c-.3-1.9-.4-1.7-.6-2-.9-.6-2.3-.7-2.3-.7H17.4s-1.4 0-2.3.7c-.2.3-.3.1-.6 2C14 5.7 11.9 20 11.9 20s5.8.3 13.4.3h0c7.3 0 12.8-.3 12.8-.3z"/> </svg>`;]]]
styles: &icon_lamp_styles
custom_fields:
icon_lamp:
[
top: 11%,
left: 4.5%,
width: 3.05vw,
position: absolute,
]
template: light
#################################################
# #
# FAN #
# #
#################################################
- type: custom:button-card
entity: fan.bedroom
triggers_update: ["fan.bedroom", "input_boolean.bedroom"]
style:
top: 37.9%
left: 80.05%
width: 10%
tap_action:
action: toggle
hold_action: !include popup/sovrum_flakt.yaml
custom_fields:
icon_fan: >
[[[ const boolean = states[entity.entity_id.replace(entity.entity_id.split('.')[0], 'input_boolean')].state;
const style = '<svg viewBox="0 0 50 50"> <style>@keyframes rotate{0%{visibility:visible;transform:rotate(0deg)}100%{transform:rotate(1080deg)}}.start{animation:rotate 2.8s ease-in;transform-origin:center;fill:#5daeea;visibility:hidden}.on_delay{animation:rotate 1.8s linear infinite;transform-origin:center;fill:#5daeea;animation-delay:2.8s;visibility:hidden}.on{animation:rotate 1.8s linear infinite;transform-origin:center;fill:#5daeea;visibility:hidden}.end{animation:rotate 2.8s;transform-origin:center;fill:#9ca2a5;animation-timing-function:cubic-bezier(.61,1,.88,1)}</style>';
const path = '<circle cx="25" cy="25" r="6.6"/> <path d="M31.9 30.4c-.5.6-1.1 1.1-1.7 1.5-1.4 1.1-3.2 1.7-5.2 1.7-2.3 0-4.5-.9-6-2.4-.9 1.1-1.6 2.3-2.3 3.2l-4.9 5.4c-1.8 2.7.3 5.6 2.5 7 3.9 2.4 9.8 3.1 14.1 1.9 4.6-1.3 7.9-4.7 7.4-9.7-.2-3.4-1.9-6-3.9-8.6zM17 28.3c-.4-1-.6-2.1-.6-3.3a8.7 8.7 0 0 1 6.4-8.4l-1.6-3.5L19 6.2c-1.5-2.8-5-2.5-7.3-1.2-4 2.2-7.5 6.9-8.7 11.3-1.2 4.6.2 9.2 4.7 11.3 3.1 1.3 6.1 1.2 9.3.7zm26.9-17.6c-3.3-3.4-8-4.6-12.1-1.8-2.8 1.8-4.2 4.6-5.5 7.5 4.2.6 7.4 4.2 7.4 8.6 0 .9-.1 1.7-.4 2.5 1.3.2 2.8.3 3.8.4 2.3.4 4.7 1.3 7.1 1.7 3.2.3 4.7-3 4.8-5.6.3-4.6-1.9-10.1-5.1-13.3z"/>';
if (entity.state === 'off' && boolean === 'off') { return `${style}<g class="end">${path}</g></svg>`; }
if (entity.state === 'on' && boolean === 'off') { return `${style}<g class="start">${path}</g><g class="on_delay">${path}</g></svg>`; }
if (entity.state === 'on' && boolean === 'on') { return `${style}<g class="on">${path}</g></svg>`; }
else if (entity.state==='off' && boolean==='on') { return `${style}<g fill="#9ca2a5">${path}</g></svg>`; } ]]]
styles:
custom_fields:
icon_fan:
[
top: 9%,
left: 10%,
width: 3vw,
position: absolute,
]
template: ["base", "loader"]
#################################################
# #
# TV2 #
# #
#################################################
# - type: custom:button-card
# entity: media_player.samsung_tv_remote
# triggers_update:
# [
# "media_player.samsung_tv_remote",
# "input_boolean.samsung_tv_remote",
# ]
# style:
# top: 37.9%
# left: 91.05%
# width: 10%
# tap_action: *tv_tap_action
# hold_action: !include popup/sovrum_tv2.yaml
# custom_fields:
# icon_tv: *icon_tv
# styles: *icon_tv_styles
# template: ["base", "loader"]
##########################################################################
# #
# * MEDIA * #
# #
##########################################################################
- prefix: Media
<<: *title
style:
top: 53.4%
left: 25.4%
<<: *title-style
- type: custom:swipe-card
start_card: 1
parameters:
roundLengths: true
effect: coverflow
speed: 650
spaceBetween: 20
threshold: 7
coverflowEffect:
rotate: 80
depth: 300
style:
top: 56.55%
left: 35.8%
width: 20.97%
height: 1px
--ha-card-border-radius: .88vw
cards:
- type: picture-elements
image: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' /%3E"
elements:
#################################################
# #
# RECENTLY DOWNLOADED #
# #
#################################################
- type: conditional
conditions:
- entity: input_select.conditional_media
state: Siste fra Plex
elements:
- type: custom:button-card
entity: sensor.plex_recently_added
triggers_update:
["sensor.plex_recently_added"]
name: Siste fra Plex
state_display: >
[[[ const data = states[entity.entity_id].attributes.data;
const number = data[1].number == undefined ? '(' + data[1].aired.split('-')[0] + ')' : data[1].number;
return `${data[1].title} ${number}`; ]]]
custom_fields:
icon: >
<svg viewBox="0 0 50 50"><path d="M7.7.3h34.6c4.1 0 7.4 3.3 7.4 7.4v34.6c0 4.1-3.3 7.4-7.4 7.4H7.7c-4.1 0-7.4-3.3-7.4-7.4V7.7C.3 3.6 3.6.3 7.7.3z" fill="#282a2d"/><path d="M25,7.1H14.6L25,25L14.6,42.9H25L35.4,25L25,7.1z" fill="#e5a00d"/></svg>
blur: >
<svg viewBox="0 0 50 50" />
styles:
custom_fields:
media_image:
&plex_poster [
background-position: center center,
background-image: "[[[ return 'url(' + states[entity.entity_id].attributes.data[1].fanart + ')'; ]]]",
]
blur: *plex_poster
overlay:
[
background: "rgba(0, 0, 0, 0.4)",
]
card:
[
color: "#efefef",
text-shadow: "1px 1px 5px rgba(18, 22, 23, 0.9)",
]
tap_action:
action: none
style:
top: 50%
left: 50%
width: 100%
template: conditional_media
#################################################
# #
# APPLE TV VARDAGSRUM #
# #
#################################################
- type: conditional
conditions:
- entity: input_select.conditional_media
state: TV
elements:
- type: custom:button-card
entity: media_player.stue_2
custom_fields:
icon: &icon_apple_tv >
<svg viewBox="0 0 50 50"><path d="M25.2 49.7l-13.7-.1c-2.4 0-4.6-.8-6.5-2.2-2-1.6-3.6-3.6-4.3-6.2-.2-1-.2-1.9-.3-3V11.5C.5 7.9 1.9 5 4.8 2.7 6.2 1.6 7.8.8 9.6.5c.5-.1.9-.1 1.4-.1L27.5.3l10.9.1c2.6 0 4.8.8 6.7 2.4 2.1 1.7 3.7 3.9 4.2 6.6l.2 2.4.1 20.5-.1 6.7c-.1 2.2-.9 4.2-2.2 5.9-1.7 2.2-4 3.8-6.8 4.4-.6.1-1.2.2-1.9.2-.1.1-13.4.2-13.4.2zm-4-27.8c-.9-1.2-2.2-1.6-3.7-1.2-.4.1-.8.2-1.2.4-.3.1-.6.1-.8 0-.4-.1-.8-.3-1.2-.4-.3-.1-.7-.1-1-.1-1.5.2-2.4 1.1-3 2.6-.4 1.1-.3 2.2 0 3.5.4 1.5 1 2.9 2.1 4 .5.6 1.2.9 2 .6 1.1-.5 2.2-.5 3.4 0 .8.3 1.5 0 2.1-.6.7-.8 1.1-1.8 1.6-2.8v-.2c-1-.6-1.7-1.4-1.8-2.7-.2-1.4.5-2.4 1.5-3.1zm9.9-1.4c.1.2.1.3.1.4l3.6 9.5c.1.3.3.4.6.4h.7c.6 0 .6 0 .9-.6l3.7-9.4c.1-.1.1-.3.2-.5H39l-2.9 8.3-3.1-8.3-1.9.2zM27.3 18l-1.3.4c-.5.2-.5.2-.6.7v1.4h-1.6l.1 1.4h1.5v5c0 .7.1 1.4.2 2.1.1.5.3 1 .8 1.4.8.6 2.6.7 3.5.2l-.1-1.2h-1.3c-.5 0-.9-.3-1-.8-.1-.3-.2-.6-.2-1v-5.8H30c0-.5.1-1 0-1.4h-2.7V18zm-8.8-.9c-1.9.3-3 2-2.7 3.2 1.4.2 2.9-1.7 2.7-3.2z"/></svg>
style:
top: 50%
left: 50%
width: 100%
template: conditional_media
#################################################
# #
# APPLE TV SOVRUM #
# #
#################################################
- type: conditional
conditions:
- entity: input_select.conditional_media
state: Kjøkken
elements:
- type: custom:button-card
entity: media_player.kjkken
custom_fields:
icon: *icon_apple_tv
style:
top: 50%
left: 50%
width: 100%
template: conditional_media
#################################################
# #
# PLAYSTATION 4 #
# #
#################################################
- type: conditional
conditions:
- entity: input_select.conditional_media
state: Bad
elements:
- type: custom:button-card
entity: media_player.bad
custom_fields:
icon: &icon_ps4 >
<svg viewBox="0 0 50 50"><path d="M.3 25C.3 11.3 11.4.3 25 .3 38.8.3 49.7 11.6 49.7 25c0 13.7-11.1 24.7-24.7 24.7C11.2 49.7.2 38.5.3 25zM26 35.4V16.8c0-.3.1-.6.4-.7.3-.2.6 0 .9.2.4.3.6.8.6 1.3v7.1c0 .5.1.7.6.8.3.1.5.2.8.2 1.7.4 3-.3 3.6-2 0-.1.1-.2.1-.3.3-1.1.4-2.1.3-3.2-.1-1.3-.5-2.5-1.3-3.5-.9-1.2-2.1-1.9-3.6-2.3l-6.8-2h-.3v20.8c0 .6 0 .6.6.8l3.4 1.2c.2.1.4.1.7.2h0zm1-.3c.2 0 .3-.1.4-.1l10.5-3.9c.6-.2 1-.6 1.5-1 .5-.5.5-1 0-1.5-.1-.2-.3-.3-.5-.4-.6-.5-1.3-.8-2-1-2.1-.6-4.3-.8-6.5-.5-1 .2-2 .5-3 .7-.3.1-.4.2-.4.6v2.2c0 .1.1.1.1.2.2-.1.4-.1.5-.2l4.6-1.6c.6-.2 1.2-.3 1.9-.3.3 0 .5 0 .7.1s.4.2.4.3-.2.3-.3.4c-.3.2-.5.3-.8.4l-3.2 1.2-3.5 1.3c-.4.1-.5.3-.5.7v2.4zM20.3 30c-.2.1-.3.1-.4.1l-1.7.6c-.7.2-1.4.4-2.1.4-.4 0-.7-.1-1-.2-.1 0-.3-.2-.3-.3s.1-.3.2-.3c.2-.1.5-.2.7-.3l4.2-1.6c.4-.1.5-.3.5-.7v-1.9c0-.1 0-.2-.1-.4-.2.1-.4.1-.5.2L13 28.1c-.7.3-1.4.7-2.1 1.1-.8.5-.8 1.3-.1 1.9.3.2.6.5.9.6 2.1.8 4.2 1.3 6.5 1.2.6 0 1.1-.1 1.6-.2.4-.1.5-.2.5-.6V30z" /></svg>
style:
top: 50%
left: 50%
width: 100%
template: conditional_media
#################################################
# #
# GOOGLE NEST MINI #
# #
#################################################
- type: conditional
conditions:
- entity: input_select.conditional_media
state: Kontor
elements:
- type: custom:button-card
entity: media_player.kontor
custom_fields:
icon: &icon_nest_mini >
<svg viewBox="0 0 50 50"><path d="M49.7 25c0 13.6-11.1 24.7-24.8 24.7C11.3 49.7.3 38.6.3 25S11.4.3 25 .3 49.7 11.4 49.7 25zm-33.9 0a2.22 2.22 0 0 0-2.2-2.2c-1.2 0-2.3 1-2.3 2.2a2.22 2.22 0 0 0 2.2 2.2c1.3.1 2.3-.9 2.3-2.2h0zm10.8 0c0 1.2.9 2.2 2.2 2.3 1.3 0 2.3-1 2.3-2.2 0-1.3-1-2.3-2.2-2.3-1.3 0-2.3.9-2.3 2.2zm-3.2 0a2.22 2.22 0 0 0-2.2-2.2c-1.2 0-2.3 1-2.3 2.2a2.22 2.22 0 0 0 2.2 2.2c1.3 0 2.3-.9 2.3-2.2h0zm13 2.2a2.22 2.22 0 0 0 2.2-2.2c0-1.2-1-2.3-2.2-2.3a2.22 2.22 0 0 0-2.2 2.2c0 1.3 1 2.3 2.2 2.3z" /></svg>
style:
top: 50%
left: 50%
width: 100%
template: conditional_media
#################################################
# #
# * SMALL MEDIA CONTROLS * #
# #
#################################################
- type: picture-elements
image: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' /%3E"
elements:
# SMALL APPLE TV VARDAGSRUM
- type: custom:button-card
entity: media_player.stue_2
name: Stue
custom_fields:
icon: *icon_apple_tv
style:
top: 23.9%
left: 23.8%
width: 47.7%
template: media
# SMALL APPLE TV SOVRUM
- type: custom:button-card
entity: media_player.kjkken
name: Sonos Kjøkken
custom_fields:
icon: *icon_apple_tv
style:
top: 23.9%
left: 76.2%
width: 47.7%
template: media
# SMALL PLAYSTATION 4
- type: custom:button-card
entity: media_player.bad
name: Sonos Bad
custom_fields:
icon: *icon_ps4
style:
top: 76.2%
left: 23.8%
width: 47.7%
template: media
# SMALL GOOGLE NEST MINI
- type: custom:button-card
entity: media_player.kontor
name: Sonos Kontor
custom_fields:
icon: *icon_nest_mini
style:
top: 76.2%
left: 76.2%
width: 47.7%
template: media
##########################################################################
# #
# * ÖVRIGT * #
# #
##########################################################################
- prefix: Lys
<<: *title
style:
top: 53.4%
left: 50.2%
<<: *title-style
#################################################
# #
# BADRUM #
# #
#################################################
- type: custom:button-card
entity: light.bathroom
name: Bad
style:
top: 64.5%
left: 55.18%
width: 10%
custom_fields:
icon_bathroom: >
[[[ const state = entity.state === 'on' ? 'animate_on' : 'animate_off';