-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecluttering_templates.yaml
301 lines (296 loc) · 8.37 KB
/
decluttering_templates.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
# CLIMATE SECTION - Used in Floorplan room infos
# Variables:
# - temperature_entity:
# - humidity_entity:
# - climate_entity:
# - mode_entity:
climate_section:
card:
type: custom:stack-in-card
mode: vertical
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
margin: 0px
grid-gap: "0px 4px"
padding: 4px 0px 12px 12px
grid-template-areas: '"title . temp hum"'
grid-template-rows: min-content
grid-template-columns: 1fr max-content max-content
cards:
- type: custom:button-card
template: section_title
name: Climate
- type: custom:button-card
template: state_chip
entity: '[[temperature_entity]]'
variables:
iconColor: '#ff9800'
- type: custom:button-card
template: state_chip
entity: '[[humidity_entity]]'
numeric_precision: 0
- type: custom:mushroom-select-card
entity: '[[mode_entity]]'
layout: horizontal
secondary_info: none
name: Mode
icon_color: deep-orange
tap_action:
action: none
hold_action:
action: none
icon: mdi:heat-wave
card_mod:
style: |
ha-card {
padding: 4px 12px !important;
font-family: var(--primary-font-family) !important;
}
- type: custom:mushroom-climate-card
entity: '[[climate_entity]]'
name: Thermostat
hvac_modes:
- 'off'
- 'heat'
show_temperature_control: true
layout: horizontal
secondary_info: none
tap_action:
action: more-info
card_mod:
style: |
ha-card {
padding: 4px 12px !important;
font-family: var(--primary-font-family) !important;
}
- type: custom:mini-graph-card
entities:
- '[[temperature_entity]]'
show:
name: false
icon: false
state: false
# CLIMATE SECTION W/O THERMOSTAT - Used in Floorplan room infos
# Variables:
# - temperature_entity:
# - humidity_entity:
climate_section_wo_thermo:
card:
type: custom:stack-in-card
mode: vertical
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
margin: 0px
grid-gap: "0px 4px"
padding: 4px 0px 12px 12px
grid-template-areas: '"title . temp hum"'
grid-template-rows: min-content
grid-template-columns: 1fr max-content max-content
cards:
- type: custom:button-card
template: section_title
name: Climate
- type: custom:button-card
template: state_chip
entity: '[[temperature_entity]]'
variables:
iconColor: '#ff9800'
- type: custom:button-card
template: state_chip
entity: '[[humidity_entity]]'
numeric_precision: 0
- type: custom:mini-graph-card
entities:
- '[[temperature_entity]]'
show:
name: false
icon: false
state: false
# CLEANING SECTION - Used in Floorplan room infos
# Variables:
# - xiaomi_room_id
cleaning_section:
card:
type: custom:stack-in-card
mode: vertical
cards:
# Title
- type: custom:button-card
template: section_title
name: Cleaning
styles:
card:
- padding: 8px var(--ha-card-padding) 16px
- height: 48px
# Text
- type: custom:button-card
template: section_text
name: Immediately send Vaskepott to clean ONLY this room.
# Fan buttons
- type: custom:layout-card
layout_type: grid
layout:
grid-gap: "0px var(--ha-card-padding)"
grid-template-columns: 1fr 1fr 1fr 1fr
margin: 0px
padding: var(--ha-card-padding)
cards:
- type: custom:button-card
entity: script.robot_clean_target_room
icon: mdi:power-sleep
template: vacuum_fan_and_room
variables:
fan_speed: "Silent"
target_room: '[[xiaomi_room_id]]'
- type: custom:button-card
icon: mdi:fan
entity: script.robot_clean_target_room
template: vacuum_fan_and_room
variables:
fan_speed: "Standard"
target_room: '[[xiaomi_room_id]]'
- type: custom:button-card
icon: mdi:fan-plus
entity: script.robot_clean_target_room
template: vacuum_fan_and_room
variables:
fan_speed: "Medium"
target_room: '[[xiaomi_room_id]]'
- type: custom:button-card
icon: mdi:fan-speed-3
entity: script.robot_clean_target_room
template: vacuum_fan_and_room
variables:
fan_speed: "Turbo"
target_room: '[[xiaomi_room_id]]'
last_cleaning_section:
card:
type: custom:layout-card
layout_type: custom:grid-layout
layout:
margin: 0px
grid-gap: "0px 24px"
padding: var(--ha-card-padding)
grid-template-rows: min-content
grid-template-columns: 60% 1fr
cards:
# Last cleaning stats
- type: vertical-stack
cards:
# Last cleaning time
- type: custom:button-card
template: data_label_line
entity: sensor.esmeralda_last_clean_start
name: Last cleaning
state_display: >
[[[
return helpers.formatShortDateTime(entity.state);
]]]
# Cleaning mode
- type: custom:button-card
template: data_label_line
entity: input_text.last_cleaning_mode
name: Mode
styles:
grid:
- grid-template-columns: 1fr 9em
# Cleaning duration
- type: custom:button-card
template: data_label_line
entity: sensor.esmeralda_last_clean_duration
name: Duration
state_display: >
[[[
if (entity.state < 60) return `${entity.state}s`;
let min = Math.floor(entity.state/60);
let sec = entity.state % 60;
return `${min}m ${sec}s`;
]]]
# Cleaned area
- type: custom:button-card
template: data_label_line
entity: sensor.esmeralda_last_clean_area
name: Cleaned area
numeric_precision: 1
# Last cleaned rooms
- type: custom:button-card
template: data_label_line
entity: input_text.last_cleaned_rooms
name: Rooms
styles:
state:
- white-space: normal
- word-break: break-word
- text-align: right
grid:
- grid-template-columns: 1fr 9em
# Robot at Glance
- type: custom:button-card
template: robot_glance
entity: vacuum.esmeralda
current_cleaning_section:
card:
type: custom:layout-card
layout_type: custom:grid-layout
layout:
margin: 0px
grid-gap: "0px 24px"
padding: var(--ha-card-padding)
grid-template-rows: min-content
grid-template-columns: 60% 1fr
cards:
# Current cleaning stats
- type: vertical-stack
cards:
# Currently cleaning rooms
- type: custom:button-card
template: data_label_line
entity: input_text.last_cleaned_rooms
name: Cleaning
styles:
state:
- white-space: normal
- word-break: break-word
- text-align: right
grid:
- grid-template-columns: 1fr 9em
# Cleaning mode
- type: custom:button-card
template: data_label_line
entity: input_text.last_cleaning_mode
name: Mode
styles:
grid:
- grid-template-columns: 1fr 9em
# Cleaning duration
- type: custom:button-card
template: data_label_line
entity: sensor.esmeralda_current_clean_duration
name: Duration
state_display: >
[[[
if (entity.state < 60) return `${entity.state}s`;
let min = Math.floor(entity.state/60);
let sec = entity.state % 60;
return `${min}m ${sec}s`;
]]]
# Cleaned area
- type: custom:button-card
template: data_label_line
entity: sensor.esmeralda_current_clean_area
name: Cleaned area
numeric_precision: 1
# Battery percent
- type: custom:button-card
template: data_label_line
entity: sensor.esmeralda_battery
name: Battery
numeric_precision: 0
# Robot at Glance
- type: custom:button-card
template: robot_glance
entity: vacuum.esmeralda