-
Notifications
You must be signed in to change notification settings - Fork 1
/
card.yaml
943 lines (871 loc) · 41.4 KB
/
card.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
square: false
type: grid
cards:
- type: custom:swipe-card
card_width: 200px
start_card: 2
parameters:
effect: coverflow
grabCursor: true
centeredSlides: true
slidesPerView: auto
coverflowEffect:
rotate: 50
stretch: 0
depth: 100
modifier: 1
slideShadows: true
pagination:
type: bullets
cards:
- type: custom:mushroom-template-card
primary: '{{ states.sensor.ultimo_orario_parcheggio.state }}'
secondary: Ultima Sosta
icon: mdi:timer-pause
entity: sensor.sensor.ultimo_orario_parcheggio
tap_action:
action: more-info
layout: vertical
icon_color: |-
{% if is_state('binary_sensor.t_crock_vehicle_moving', 'off') %}
red
{% else %}
green
{% endif %}
line_width: 16
line_color: '#FF6384'
- type: custom:mushroom-template-card
icon: mdi:car-hatchback
entity: sensor.t_crock_last_trip_average_fuel_consumption
icon_color: blue
tap_action:
action: more-info
primary: >-
{{ states.sensor.t_crock_last_trip_average_fuel_consumption.state }}
litri/100 km
secondary: Consumo medio
layout: vertical
fill_container: true
card_mod:
style:
mushroom-shape-icon$: |
.shape {
clip-path: inset(0 0 0 0);
}
.: |
ha-state-icon {
animation: vroom 2s ease-in-out infinite;
}
@keyframes vroom {
49% { opacity: 1;}
50% { transform: translate(32px); opacity: 0; }
51% { transform: translate(-32px); opacity: 0; }
52% { opacity: 1; }
}
line_color: '#36A2EB'
line_width: 8
- type: custom:mushroom-template-card
primary: |
{{ states.sensor.ultimo_aggiornamento_dati_macchina.state }}
secondary: Ultimo Aggiornamento
icon: mdi:cloud-upload
entity: sensor.ultimo_aggiornamento_dati_macchina
tap_action:
action: more-info
layout: vertical
icon_color: orange
fill_container: true
line_color: '#ffce57'
line_width: 8
- type: custom:swipe-card
cards:
- square: false
type: grid
cards:
- type: picture-elements
image: /local/mappacasa/t_roc.png
title: T CROCK
elements:
- type: image
image: /local/mappacasa/forza.png
style:
'--mdc-icon-size': 30px
top: 0%
left: 94%
width: 14%
- type: custom:stack-in-card
mode: vertical
cards:
- type: custom:mushroom-person-card
entity: person.t_crock
use_entity_picture: true
hide_name: true
hide_state: true
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Federico
content:
type: vertical-stack
cards:
- type: custom:mushroom-entity-card
entity: person.t_crock
layout: horizontal
icon_type: entity-picture
primary_info: state
secondary_info: last-changed
tap_action:
action: none
hold_action:
action: none
card_mod:
style:
mushroom-shape-avatar$: |
.picture {
/* Style shadow ring around person avatar */
box-shadow: 0px 0px 8px 4px var(--state-person);
margin-right: var(--mush-title-spacing, 12px);
}
.: |
ha-card {
/* Remove default card styling */
--ha-card-background: rgba(var(--rgb-card-background-color), 0.);;
box-shadow: none;
--ha-card-border-width: 0;
/* Increase icon size */
--icon-size: 80px;
/* Center card */
margin: auto;
width: fit-content;
/* Add padding to bottom of card */
padding: 0px 0px var(--mush-title-spacing, 12px) 0px !important;
/* Make card non-responsive to select and pointer */
user-select: none;
pointer-events: none;
transition: all 0s;
}
:host {
/* Define Person State colors. Can be added to theme */
--state-person-home: var(--green-color);
--state-person-not-home: var(--red-color);
--state-person-zone: var(--blue-color);
--state-person-unknown: var(--grey-color);
/* Set Person State color */
--state-person:
{% if is_state(config.entity, ['home', 'not_home', 'unknown']) %}
var(--state-person-{{ states(config.entity) | replace('_', '-') }})
{% else %}
var(--state-person-zone)
{% endif %};
/* Match styling to Mushroom Title */
--mush-card-primary-font-size: var(--mush-title-font-size, 24px);
--mush-card-primary-font-weight: var(--mush-title-font-weight, normal);
--mush-card-primary-line-height: var(--ush-title-line-height, 1.2);
--mush-card-secondary-font-size: var(--mush-title-font-size, 16px);
--mush-card-secondary-font-weight: var(--mush-title-font-weight, normal);
--mush-card-secondary-line-height: var(--ush-title-line-height, 1.2);
}
- type: history-graph
entities:
- entity: person.t_crock
name: ' '
hours_to_show: 24
title: Timeline
card_mod:
style:
$: |
.card-header {
/* Style timeline title */
padding: 0px 24px !important;
font-size: var(--mush-card-primary-font-size, 14px) !important;
font-weight: var(--mush-card-primary-font-weight, bold) !important;
line-height: var(--mush-card-primary-line-height, 1.5) !important;
color: var(--primary-text-color) !important;
}
.: |
ha-card {
/* Remove default card styling */
--ha-card-box-shadow: none;
--ha-card-background: none;
--ha-card-border-width: 0;
user-select: none;
}
.content {
/* Add padding on right */
padding: 0px 24px !important;
}
- type: horizontal-stack
cards:
- type: conditional
conditions:
- entity: device_tracker.t_crock_position
state_not: not home
card:
type: custom:mushroom-template-card
primary: '{{ states(entity) }} '
secondary: >-
{{ state_attr(entity, 'distance') |
round(1) }} km
icon: mdi:map-marker-path
entity: device_tracker.t_crock_position
layout: vertical
icon_color: purple
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style:
mushroom-state-info$: |
.primary:after {
/* Add destination details */
content: "\A Casa";
white-space: pre;
text-overflow: ellipsis;
}
.: |
ha-card {
/* Remove default card styling */
--ha-card-background: none;
--ha-card-box-shadow: none;
--ha-card-border-width: 0;
/* Center card on row */
width: fit-content;
margin: auto;
/* Make card non-responsive to select and pointer */
user-select: none;
pointer-events: none;
}
- type: horizontal-stack
cards:
- type: conditional
conditions:
- entity: device_tracker.t_crock_position
state_not: home
card:
type: custom:mushroom-template-card
primary: >-
{{ states(entity) }} {{
state_attr(entity,
'unit_of_measurement') }}
secondary: >-
{{ state_attr(entity, 'distance') |
round(1) }} km
icon: mdi:map-marker-path
entity: device_tracker.t_crock_position
layout: vertical
icon_color: purple
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style:
mushroom-state-info$: |
.primary:after {
/* Add destination details */
content: "\A Lavoro";
white-space: pre;
text-overflow: ellipsis;
}
.: |
ha-card {
/* Remove default card styling */
--ha-card-background: none;
--ha-card-box-shadow: none;
--ha-card-border-width: 0;
/* Center card on row */
width: fit-content;
margin: auto;
/* Make card non-responsive to select and pointer */
user-select: none;
pointer-events: none;
}
- type: map
entities:
- entity: person.t_crock
dark_mode: false
hours_to_show: 24
aspect_ratio: '4:3'
card_mod:
style:
ha-map $ ha-entity-marker $: |
.marker {
/* Style person marker & adjust position to avoid blocking waypoints */
border: 3px solid var(--state-person) !important;
border-radius: 50% 50% 50% 0px !important;
transform: rotate(-45deg) translate(50%, -50%);
overflow: visible !important;
background: var(--state-person) !important;
}
.entity-picture {
/* Correct orientation of person avatar */
transform: rotate(45deg);
border-radius: 50%;
}
ha-map $: |
path:first-child {
/* Style accuracy radius */
stroke: var(--state-person);
fill: color-mix(in srgb, var(--state-person) 50%, transparent);
stroke-width: 0px;
}
path:nth-child(even) {
/* Styling for waypoints */
stroke: var(--purple-color);
stroke-width: 4px;
}
path:nth-child(odd):not(:first-child) {
/* Styling for lines */
stroke: var(--purple-color);
stroke-width: 4px;
}
.leaflet-control-attribution {
/* Style attribution text */
background: rgba(var(--rgb-card-background-color), 0.4) !important;
font-size: 10px;
}
.leaflet-container a {
/* Set color of zoom icons & attribution text */
color: var(--secondary-text-color);
}
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
/* Style zoom buttons like Chips */
border-radius: var(--mush-chip-border-radius, 19px) !important;
padding: 3px;
background: rgb(var(--rgb-secondary-text-color), 0.2) !important;
margin: 8px 12px 0px;
border: var(--ha-card-border-width, 1px) solid var(--ha-card-border-color, var(--divider-color, #e0e0e0)) !important;
}
.leaflet-top {
/* Move zoom buttons to bottom of map */
bottom: 0px !important;
}
.leaflet-control-zoom {
/* Allow buttons to be moved */
position: absolute !important;
/* Adjust spacing for border */
bottom: calc(2 * var(--ha-card-border-width, 1px) + 56px);
/* Remove extra margin */
margin: 0px !important;
/* Remove zoom control border */
border: none !important;
}
.leaflet-container:after {
/* Fade out map at top */
content: "";
position: absolute;
height: 100%;
width: 100%;
background: linear-gradient(to top, transparent 65%, var(--card-background-color));
}
ha-icon-button $ mwc-icon-button $: |
button {
/* Size center button to match Chip */
height: var(--mush-chip-height, 36px) !important;
width: var(--mush-chip-height, 36px) !important;
--mdc-icon-size: 22px;
}
.: |
ha-card {
/* Remove default card styling without affecting child elements */
box-shadow: none;
border-width: 0;
border-radius: 0px 0px var(--ha-card-border-radius, 12px) var(--ha-card-border-radius, 12px);
transition: all 0s;
}
:host {
/* Define Person State colors. Can be added to theme */
--state-person-home: var(--green-color);
--state-person-not-home: var(--red-color);
--state-person-zone: var(--blue-color);
--state-person-unknown: var(--grey-color);
/* Set person state color */
--state-person:
{% if is_state(config.entities[0].entity, ['home', 'not_home', 'unknown']) %}
var(--state-person-{{ states(config.entities[0].entity) | replace('_', '-') }})
{% else %}
var(--state-person-zone)
{% endif %};
}
ha-icon-button {
/* Position center button */
bottom: 12px;
left: 12px !important;
top: auto !important;
/* Style center button to match Chip */
color: var(--deep-orange-color) !important;
background: color-mix(in srgb, var(--deep-orange-color) 20%, transparent);
border-radius: var(--mush-chip-border-radius, 19px);
border: var(--ha-card-border-width, 1px) solid var(--ha-card-border-color, var(--divider-color, #e0e0e0)) !important;
}
card_mod:
style: |
:host {
/* Remove border from poup */
--popup-padding-x: 0px;
--popup-padding-y: 0px;
--popup-min-width: 450px;
}
.content {
/* Remove extra bottom border */
margin: -18px -24px -24px !important;
}
alignment: center
card_mod:
style: |
ha-card {
background: rgba(var(--rgb-card-background-color), 0.);
style:
top: 2%
left: 9%
- type: state-label
entity: sensor.t_crock_last_trip_length
title: Ultimo Viaggio
tap_action:
action: none
style:
top: 92%
left: 15%
font-size: 1em
font-weight: 600
- type: state-icon
entity: sensor.t_crock_last_trip_length
title: Ultimo Viaggio
icon: mdi:map-marker-distance
icon_color: blue
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Dati Ultimo Viaggio
content:
type: custom:stack-in-card
cards:
- type: custom:layout-card
layout_type: masonry
layout: {}
cards:
- type: custom:mushroom-entity-card
entity: >-
sensor.t_crock_last_trip_average_fuel_consumption
tap_action:
action: more-info
name: Consumo
icon: mdi:fuel
icon_color: orange
- type: custom:mushroom-entity-card
entity: sensor.t_crock_last_trip_average_speed
name: Velocità Media
tap_action:
action: more-info
icon: mdi:speedometer-slow
icon_color: green
- type: custom:mushroom-entity-card
entity: sensor.t_crock_last_trip_duration
tap_action:
action: more-info
name: Durata Ultimo Viaggio
icon: mdi:clock-end
icon_color: green
style:
top: 91%
left: 5%
'--paper-item-icon-color': orange
- type: state-icon
entity: sensor.bagagliaio_troc
icon: mdi:car-key
tap_action:
action: call-service
service: honeycomb
service_data:
size: 200
spacing: 10
buttons:
- icon: mdi:car-door-lock
color_type: icon
color: orange
styles:
icon:
- width: 200%
tap_action:
action: more-info
entity: binary_sensor.t_crock_doors_locked
- icon: mdi:window-closed
color_type: icon
color: orange
styles:
icon:
- width: 200%
tap_action:
action: more-info
entity: binary_sensor.t_crock_windows_closed
- icon: mdi:car-key
color_type: icon
color: orange
styles:
icon:
- width: 200%
tap_action:
action: more-info
entity: binary_sensor.t_crock_hood_closed
style:
top: 34%
left: 90%
'--mdc-icon-size': 32px
card_mod:
style: |
:host {
--paper-item-icon-color: {% if is_state(config.entity, 'Chiuso') %}
red
{% else %}
green
{% endif %};
}
- type: state-label
entity: sensor.t_crock_odometer
style:
top: 93%
left: 89%
tap_action:
action: more-info
- type: state-icon
entity: sensor.t_crock_odometer
style:
top: 92%
left: 76%
tap_action:
action: more-info
- type: state-icon
entity: sensor.t_crock_oil_inspection_distance
title: Ultimo Viaggio
icon: mdi:oil
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Manutenzione
content:
type: custom:stack-in-card
cards:
- type: custom:layout-card
layout_type: masonry
layout: {}
cards:
- type: custom:mushroom-entity-card
entity: sensor.t_crock_oil_inspection_distance
tap_action:
action: more-info
name: Prossimo Tagliando Km
icon: mdi:oil-level
icon_color: orange
- type: custom:mushroom-entity-card
entity: sensor.t_crock_service_inspection_days
name: Prossimo Tagliando Giorni
tap_action:
action: more-info
icon: mdi:oil-temperature
icon_color: blue
- type: custom:mushroom-entity-card
entity: sensor.t_crock_odometer
tap_action:
action: more-info
name: Km Totali
icon: mdi:speedometer-medium
icon_color: green
style:
top: 34%
left: 21%
'--paper-item-icon-color': cyan
'--mdc-icon-size': 40px
- type: state-icon
entity: binary_sensor.t_crock_parking_light
title: Posizione
icon: mdi:car-parking-lights
tap_action:
action: more-info
style:
top: 50%
left: 11%
card_mod:
style: |
:host {
--paper-item-icon-color: {% if is_state(config.entity, 'off') %}
lightgrey
{% else %}
orange
{% endif %};
- type: horizontal-stack
cards:
- type: custom:bar-card
show_icon: true
align: split
columns: 1
max: 600
positions:
icon: inside
indicator: inside
name: inside
value: inside
unit_of_measurement: Km
severity:
- color: red
from: 0
to: 100
- color: orange
from: 100
to: 400
- color: green
from: 400
to: 600
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--paper-item-icon-color: 'var(--text-primary-color';
--ha-card-box-shadow: 'none';
}
icon: mdi:fuel
name: Autonomia
entity_row: true
entities:
- entity: sensor.t_crock_combustion_range
- type: custom:bar-card
show_icon: true
align: split
columns: 1
max: 100
positions:
icon: inside
indicator: inside
name: inside
value: inside
severity:
- color: red
from: 0
to: 30
- color: orange
from: 30
to: 70
- color: green
from: 70
to: 100
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--paper-item-icon-color: 'var(--text-primary-color';
--ha-card-box-shadow: 'none';
}
icon: mdi:fuel
name: Livello Serbatoio
entity_row: true
entities:
- entity: sensor.t_crock_fuel_level
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: Portiere
secondary: |+
{{ states('sensor.portiere_troc') }}
icon: |-
{% if is_state('lock.t_crock_door_locked', 'locked') %}
mdi:lock
{% else %}
mdi:lock-open
{% endif %}
entity: lock.t_crock_door_locked
icon_color: |-
{% if is_state('lock.t_crock_door_locked', 'locked') %}
red
{% else %}
green
{% endif %}
tap_action:
action: more-info
fill_container: false
alignment: center
- type: custom:mushroom-template-card
primary: Bagagliaio
secondary: |+
{{ states('sensor.bagagliaio_troc') }}
icon: |-
{% if is_state('lock.t_crock_trunk_locked', 'locked') %}
mdi:lock
{% else %}
mdi:lock-open
{% endif %}
entity: lock.t_crock_trunk_locked
icon_color: |-
{% if is_state('lock.t_crock_trunk_locked', 'locked') %}
red
{% else %}
green
{% endif %}
tap_action:
action: more-info
fill_container: false
columns: 1
- square: false
type: grid
cards:
- type: map
entities:
- entity: person.t_crock
dark_mode: true
hours_to_show: 24
aspect_ratio: '4:3'
card_mod:
style:
ha-map $ ha-entity-marker $: |
.marker {
/* Style person marker & adjust position to avoid blocking waypoints */
border: 3px solid var(--state-person) !important;
border-radius: 50% 50% 50% 0px !important;
transform: rotate(-45deg) translate(50%, -50%);
overflow: visible !important;
background: var(--state-person) !important;
}
.entity-picture {
/* Correct orientation of person avatar */
transform: rotate(45deg);
border-radius: 50%;
}
ha-map $: |
path:first-child {
/* Style accuracy radius */
stroke: var(--state-person);
fill: color-mix(in srgb, var(--state-person) 50%, transparent);
stroke-width: 0px;
}
path:nth-child(even) {
/* Styling for waypoints */
stroke: var(--purple-color);
stroke-width: 4px;
}
path:nth-child(odd):not(:first-child) {
/* Styling for lines */
stroke: var(--purple-color);
stroke-width: 4px;
}
.leaflet-control-attribution {
/* Style attribution text */
background: rgba(var(--rgb-card-background-color), 0.4) !important;
font-size: 10px;
}
.leaflet-container a {
/* Set color of zoom icons & attribution text */
color: var(--secondary-text-color);
}
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
/* Style zoom buttons like Chips */
border-radius: var(--mush-chip-border-radius, 19px) !important;
padding: 3px;
background: rgb(var(--rgb-secondary-text-color), 0.2) !important;
margin: 8px 12px 0px;
border: var(--ha-card-border-width, 1px) solid var(--ha-card-border-color, var(--divider-color, #e0e0e0)) !important;
}
.leaflet-top {
/* Move zoom buttons to bottom of map */
bottom: 0px !important;
}
.leaflet-control-zoom {
/* Allow buttons to be moved */
position: absolute !important;
/* Adjust spacing for border */
bottom: calc(2 * var(--ha-card-border-width, 1px) + 56px);
/* Remove extra margin */
margin: 0px !important;
/* Remove zoom control border */
border: none !important;
}
.leaflet-container:after {
/* Fade out map at top */
content: "";
position: absolute;
height: 100%;
width: 100%;
background: linear-gradient(to top, transparent 65%, var(--card-background-color));
}
ha-icon-button $ mwc-icon-button $: |
button {
/* Size center button to match Chip */
height: var(--mush-chip-height, 36px) !important;
width: var(--mush-chip-height, 36px) !important;
--mdc-icon-size: 22px;
}
.: |
ha-card {
/* Remove default card styling without affecting child elements */
box-shadow: none;
border-width: 0;
border-radius: 0px 0px var(--ha-card-border-radius, 12px) var(--ha-card-border-radius, 12px);
transition: all 0s;
}
:host {
/* Define Person State colors. Can be added to theme */
--state-person-home: var(--green-color);
--state-person-not-home: var(--red-color);
--state-person-zone: var(--blue-color);
--state-person-unknown: var(--grey-color);
/* Set person state color */
--state-person:
{% if is_state(config.entities[0].entity, ['home', 'not_home', 'unknown']) %}
var(--state-person-{{ states(config.entities[0].entity) | replace('_', '-') }})
{% else %}
var(--state-person-zone)
{% endif %};
}
ha-icon-button {
/* Position center button */
bottom: 12px;
left: 12px !important;
top: auto !important;
/* Style center button to match Chip */
color: var(--deep-orange-color) !important;
background: color-mix(in srgb, var(--deep-orange-color) 20%, transparent);
border-radius: var(--mush-chip-border-radius, 19px);
border: var(--ha-card-border-width, 1px) solid var(--ha-card-border-color, var(--divider-color, #e0e0e0)) !important;
- type: custom:uptime-card
entity: sensor.posizione_troc
title_template: Posizione
icon: mdi:google-maps
ko_icon: mdi:home
ko: Casa
icon_adaptive_color: true
title_adaptive_color: true
hours_to_show: 24
color:
ok: red
ko: lightgreen
half: red
bar:
spacing: 5
height: 15
round: 4
amount: 24
show:
average: false
status: true
timeline: true
title: true
tooltip:
hour24: true
alignment:
status: spaced
header: right
icon_first: true
tap_action:
action: more-info
columns: 1
columns: 1