-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP2000.yaml
More file actions
78 lines (78 loc) · 2.09 KB
/
P2000.yaml
File metadata and controls
78 lines (78 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
type: custom:button-card
variables:
background: /local/viewassist/p2000.png
infocardversion: 1.0.0
p2000_entity: sensor.p2000_rotterdam_rijnmond
var_font_size: 45px
template:
- variable_template
- body_template
styles:
grid:
- grid-template-areas: |
"title title"
"message message"
"card card"
card:
- background: "[[[ return `center / cover repeat url(${variables.background})` ]]]"
- background-size: cover
custom_fields:
message:
- font-size: "[[[ return variables.var_font_size ]]]"
- position: relative
- padding: 10px
- border-radius: 10px
- max-width: 95%
- text-align: start
- text-wrap: wrap
- align-self: center
- justify-self: center
- padding: 2%
- font-weight: bold
- text-shadow: 3px 3px black
custom_fields:
title:
card:
type: custom:button-card
icon: |
[[[
if (states['input_boolean.p2000'].state === 'on') {
return 'mdi:car-emergency'; // Icoon voor Rijnmond
} else {
return 'mdi:fire-truck'; // Icoon voor Vlaardingen
}
]]]
name: |
[[[
if (states['input_boolean.p2000'].state === 'on') {
return 'Rijnmond';
} else {
return 'Vlaardingen';
}
]]]
tap_action:
action: toggle
entity: input_boolean.p2000
hold_action:
action: navigate
navigation_path: 112
styles:
card:
- background-color: transparent
- border-width: 0px
- width: auto
- padding: 5px
grid:
- grid-template-areas: "\"i n\""
- grid-template-rows: min-content min-content
- grid-template-columns: 165px auto
name:
- font-size: 8vh
- font-weight: bold
- color: white
- text-shadow: 3px 3px black
icon:
- filter: drop-shadow(3px 3px 4px black)
- width: 18vh
- color: white
message: "[[[ return states[variables.p2000_entity].attributes.tts; ]]]"