-
Notifications
You must be signed in to change notification settings - Fork 0
/
hal_room_card.yaml
281 lines (268 loc) · 10.3 KB
/
hal_room_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
type: custom:vertical-stack-in-card
horizontal: false
cards:
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Hal
icon: hue:room-hallway
icon_color: teal
layout: horizontal
entity: light.wled_kapstok
secondary: >-
{{states('sensor.hal_motion_hue_temperature') }}°C |
{{states('sensor.hal_motion_hue_illuminance_lux') | int }}lux
tap_action:
action: navigate
navigation_path: /lovelace-tablet/hal
badge_icon: |
{% if is_state('binary_sensor.hal_motion_hue_occupancy', 'on') %}
mdi:human-greeting
{% else %}
mdi:motion-sensor-off
{% endif %}
badge_color: |
{% if is_state('binary_sensor.hal_motion_hue_occupancy', 'on') %}
green
{% else %}
disabled
{% endif %}
fill_container: true
multiline_secondary: false
card_mod:
style: |
ha-card {
z-index: 1;
}
- type: custom:mini-graph-card
entities:
- entity: sensor.hal_motion_hue_temperature
name: Temperature
color_thresholds:
- value: -20
color: '#264CFF'
- value: -15
color: '#3FA0FF'
- value: -10
color: '#72D8FF'
- value: -5
color: '#AAF7FF'
- value: 0
color: '#E0FFFF'
- value: 5
color: '#FFFFBF'
- value: 10
color: '#FFE099'
- value: 15
color: '#FFAD72'
- value: 20
color: '#F76D5E'
- value: 25
color: '#D82632'
- value: 30
color: '#A50021'
height: 50
hours_to_show: 24
line_width: 2
font_size: 50
animate: true
show:
name: false
icon: false
state: false
legend: false
fill: fade
labels: false
labels_secondary: false
points: false
card_mod:
style: |
ha-card {
position: absolute !important;
height: 100%;
width: 100%;
top: 0px;
--ha-card-border-width: 0;
}
ha-card:after {
content: "";
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(to right, var(--card-background-color) 20%, transparent);
}
- type: custom:vertical-stack-in-card
mode: vertical
cards:
- type: custom:vertical-stack-in-card
horizontal: true
cards:
- type: custom:mushroom-template-card
entity: light.wled_kapstok
layout: vertical
icon: |-
{% if is_state('light.wled_kapstok', 'on') %}
hue:room-hallway
{% else %}
hue:room-hallway
{% endif %}
icon_color: |-
{% if is_state('light.wled_kapstok', 'on') %}
yellow
{% endif %}
double_tap_action:
action: call-service
service: input_boolean.toggle
target:
entity_id: input_boolean.node_red_hal_automations
data: {}
card_mod:
style:
mushroom-shape-icon$: >
{% if is_state('input_boolean.node_red_hal_automations', 'on')
%}
.shape {
--shape-animation: ping 3s infinite;
}
@keyframes ping {
0% {
box-shadow: 0 0 5px 1px rgba(var(--rgb-blue), 0.7);
}
100% {
box-shadow: 0 0 5px 5px transparent;
}
}
{% elif is_state('input_boolean.node_red_hal_automations',
'off') %}
{% endif %}
- type: custom:mushroom-chips-card
chips:
- type: conditional
conditions:
- entity: binary_sensor.voordeur_ding
state: 'on'
chip:
type: entity
icon: mdi:bell-ring
icon_color: indigo
entity: binary_sensor.voordeur_ding
tap_action:
action: more-info
- type: template
icon: mdi:smoke
icon_color: |2-
{% if is_state(entity, 'on') %}
red
{% else %}
grey
{% endif %}
entity: binary_sensor.rookmelder_bg_gang_kaku_smoke
tap_action:
action: more-info
- type: template
icon: mdi:motion-sensor
icon_color: |2-
{% if is_state(entity, 'on') %}
blue
{% else %}
grey
{% endif %}
entity: binary_sensor.hal_motion_hue_occupancy
tap_action:
action: more-info
- type: template
icon: mdi:doorbell-video
icon_color: |2-
{% if is_state(entity, 'on') %}
blue
{% else %}
disabled
{% endif %}
entity: binary_sensor.voordeur_ding
tap_action:
action: navigate
navigation_path: /lovelace-tablet/voordeurbel
alignment: end
card_mod:
style:
mushroom-template-chip: |
ha-card {
--ha-card-box-shadow: none;
--chip-background: none;
--chip-box-shadow: none;
--chip-spacing: 0;
: -36px;
}
mushroom-template-chip:nth-child(1)$: |
{% if is_state('binary_sensor.voordeur_ding','on') %}
ha-state-icon {
animation: ring 4s linear infinite;
transform-origin: 50% 15%;
}
@keyframes ring {
0% { transform: rotate(0); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
2% { transform: rotate(30deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
6% { transform: rotate(-28deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
10% { transform: rotate(34deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
14% { transform: rotate(-32deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
18% { transform: rotate(30deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
22% { transform: rotate(-28deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
26% { transform: rotate(26deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
30% { transform: rotate(-24deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
34% { transform: rotate(22deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
38% { transform: rotate(-20deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
42% { transform: rotate(18deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
46% { transform: rotate(-16deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
50% { transform: rotate(14deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
54% { transform: rotate(-12deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
58% { transform: rotate(10deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
62% { transform: rotate(-8deg); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
66% { transform: rotate(6deg); }
70% { transform: rotate(-4deg); }
74% { transform: rotate(2deg); }
78% { transform: rotate(-1deg); }
82% { transform: rotate(1deg); }
86% { transform: rotate(0); }
100% { transform: rotate(0); clip-path: polygon(0 50%, 0 100%, 100% 100%, 100% 50%, 85% 50%, 80% 30%, 60% 5%, 40% 5%, 20% 30%, 15% 50%); }
}
}
{% else %}
{% endif %}
}
mushroom-template-chip:nth-child(2)$: >
{% if is_state('binary_sensor.rookmelder_bg_gang_kaku_smoke','on')
%}
ha-state-icon {
animation: clip 2s linear infinite;
}
@keyframes clip {
50% { clip-path: polygon(0 0, 55% 0, 100% 100%, 0 100%); }
}
.shape {
--shape-animation: motion 2s linear infinite;
}
@keyframes motion {
0%, 100% { --shape-color: rgba(var(--rgb-blue), 0.3); }
50% { --shape-color: rgba(var(--rgb-blue), 0.2); }
}
}
{% else %}
mushroom-template-chip:nth-child(3)$: |
{% if is_state('binary_sensor.hal_motion_hue_occupancy','on') %}
ha-state-icon {
animation: clip 2s linear infinite;
}
@keyframes clip {
50% { clip-path: polygon(0 0, 55% 0, 100% 100%, 0 100%); }
}
.shape {
--shape-animation: motion 2s linear infinite;
}
@keyframes motion {
0%, 100% { --shape-color: rgba(var(--rgb-blue), 0.3); }
50% { --shape-color: rgba(var(--rgb-blue), 0.2); }
}
}
{% else %}
{% endif %}
}