-
Notifications
You must be signed in to change notification settings - Fork 0
/
floorplan.yaml
446 lines (427 loc) · 16.1 KB
/
floorplan.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
title: Floorplan
decluttering_templates: !include_dir_named floorplan/
views:
- title: Floorplan
path: floorplan
visible:
- user: 7fdffcaeaaf54b98b330878819fde53b
- user: fa063b0a882d4d0db342e51962d59c08
panel: true
icon: 'mdi:floor-plan'
badges: []
cards:
- type: 'custom:config-template-card'
entities:
- light.hallbyra
- light.hall_sovrum_1
- light.hall_ytterdorr_1
- light.trappa
- light.vardagsrumsbord
- light.fonsterlampa_mot_uterum
- light.fonsterlampa_vardagsrum
- light.danslampa
- light.kokslampa
- light.diskbank
- light.taklampa_signes_rum
variables:
setOpacity: |
entity => {
if(states[entity].state === 'on') {
if (typeof states[entity].attributes.brightness !== 'undefined') {
return states[entity].attributes.brightness / 255;
}
return 1;
}
return 0;
}
##### NIGHT IMAGE #####
card:
type: picture-elements
image: '/local/floorplan/nighttime.png?v=1'
style: |
ha-card:first-child {
width: 100%;
height: 100%;
}
elements:
##### CONDITIONAL DAY IMAGE #####
- type: conditional
conditions:
- entity: sun.sun
state: above_horizon
elements:
- type: image
entity: sun.sun
image: '/local/floorplan/daytime.png?v=1'
style:
height: 100%
width: 100%
left: 50%
top: 50%
mix-blend-mode: lighten
opacity: "${ states['sensor.sunlight_opacity'].state }"
action: none
tap_action:
action: none
hold_action:
action: none
##### LIGHT OVERLAY IMAGES #####
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.hallbyra
- image: '/local/floorplan/lights/hallway-drawer.png'
- opacity: "${ setOpacity('light.hallbyra') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.hall_ytterdorr_1
- image: '/local/floorplan/lights/hallway-ceiling-door.png'
- opacity: "${ setOpacity('light.hall_ytterdorr_1') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.hall_sovrum_1
- image: '/local/floorplan/lights/hallway-ceiling-bedrooms.png'
- opacity: "${ setOpacity('light.hall_sovrum_1') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.danslampa
- image: '/local/floorplan/lights/living-room-dance-light.png'
- opacity: "${ setOpacity('light.danslampa') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.vardagsrumsbord
- image: '/local/floorplan/lights/living-room-table.png'
- opacity: "${ setOpacity('light.vardagsrumsbord') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.fonsterlampa_mot_uterum
- image: '/local/floorplan/lights/living-room-tv-light.png'
- opacity: "${ setOpacity('light.fonsterlampa_mot_uterum') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.fonsterlampa_vardagsrum
- image: '/local/floorplan/lights/living-room-window.png'
- opacity: "${ setOpacity('light.fonsterlampa_vardagsrum') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.trappa
- image: '/local/floorplan/lights/staircase.png'
- opacity: "${ setOpacity('light.trappa') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.kokslampa
- image: '/local/floorplan/lights/kitchen-table.png'
- opacity: "${ setOpacity('light.kokslampa') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.diskbank
- image: '/local/floorplan/lights/kitchen-sink.png'
- opacity: "${ setOpacity('light.diskbank') }"
- type: custom:decluttering-card
template: ikea-light
variables:
- entity: light.taklampa_signes_rum
- image: '/local/floorplan/lights/signe-ceiling.png'
- opacity: "${ setOpacity('light.taklampa_signes_rum') }"
##### ROOM CONTROLS #####
- type: custom:decluttering-card
template: room-controls
variables:
- entity: light.living_room_lights
- room-name: Vardagsrum
- width: 48.5%
- height: 53.3%
- top: 0
- left: 0
- type: custom:decluttering-card
template: room-controls
variables:
- entity: light.signes_rum
- room-name: Signes rum
- width: 25.8%
- height: 53.3%
- top: 0
- left: 48.5%
- type: custom:decluttering-card
template: room-controls
variables:
- entity: light.signes_rum
- room-name: Signes rum
- width: 25.8%
- height: 53.3%
- top: 0
- left: 48.5%
- type: custom:decluttering-card
template: room-controls
variables:
- entity: light.kitchen_lights
- room-name: Kök
- width: 34.4%
- height: 46.7%
- top: 53.3%
- left: 0
- type: custom:decluttering-card
template: room-controls
variables:
- entity: light.hallway_lights
- room-name: Hall
- width: 22.4%
- height: 46.7%
- top: 53.3%
- left: 34.4%
- type: custom:decluttering-card
template: room-controls
variables:
- entity: light.hallway_lights
- room-name: Hall
- width: 25.2%
- height: 16%
- top: 53.3%
- left: 56.8%
##### LIGHT CONTROL ICONS #####
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.hallbyra
- left: 51%
- top: 56%
- type: state-icon
- name: "${ states['light.hallbyra'].attributes.friendly_name }"
- icon: mdi:lamp
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.danslampa
- left: 22%
- top: 48%
- type: state-icon
- name: "${ states['light.danslampa'].attributes.friendly_name }"
- icon: mdi:floor-lamp-dual
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.vardagsrumsbord
- left: 43.5%
- top: 20%
- type: state-icon
- name: "${ states['light.vardagsrumsbord'].attributes.friendly_name }"
- icon: mdi:ceiling-light
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.trappa
- left: 55%
- top: 88%
- type: state-icon
- name: "${ states['light.trappa'].attributes.friendly_name }"
- icon: mdi:coach-lamp
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.hall_ytterdorr_1
- left: 42.5%
- top: 76%
- type: state-icon
- name: "${ states['light.hall_ytterdorr_1'].attributes.friendly_name }"
- icon: mdi:ceiling-light
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.hall_sovrum_1
- left: 64%
- top: 60%
- type: state-icon
- name: "${ states['light.hall_sovrum_1'].attributes.friendly_name }"
- icon: mdi:ceiling-light
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.kokslampa
- left: 28.6%
- top: 82.4%
- type: state-icon
- name: "${ states['light.kokslampa'].attributes.friendly_name }"
- icon: mdi:ceiling-light
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.diskbank
- left: 15%
- top: 67%
- type: state-icon
- name: "${ states['light.diskbank'].attributes.friendly_name }"
- icon: mdi:ceiling-light
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.fonsterlampa_mot_uterum
- left: 22%
- top: 10%
- type: state-icon
- name: "${ states['light.fonsterlampa_mot_uterum'].attributes.friendly_name }"
- icon: mdi:lamp
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.fonsterlampa_vardagsrum
- left: 2%
- top: 33%
- type: state-icon
- name: "${ states['light.fonsterlampa_mot_uterum'].attributes.friendly_name }"
- icon: mdi:ceiling-light
- type: custom:decluttering-card
template: light-controls
variables:
- entity: light.taklampa_signes_rum
- left: 59.5%
- top: 33%
- type: state-icon
- name: "${ states['light.taklampa_signes_rum'].attributes.friendly_name }"
- icon: mdi:ceiling-light
##### MOUSE TRAPS #####
- type: conditional
conditions:
- entity: binary_sensor.mouse_trap_1
state: 'on'
elements:
- type: state-icon
entity: binary_sensor.mouse_trap_1
icon: mdi:rodent
style:
'--iron-icon-height': 1.7vw
'--iron-icon-width': 1.7vw
'--paper-item-icon-active-color': '#FFFFFF'
'--paper-item-icon-color': '#FFFFFF'
align-items: center
background-color: '#CC0000'
border-radius: 100%
box-shadow: '0px 0px 28px 0px rgba(0,0,0,0.39)'
display: flex
height: 3vw
justify-content: center
top: 81%
left: 9%
margin-left: '-1.5vw'
margin-top: '-1.5vw'
transform: scale(1.2)
width: 3vw
tap_action:
action: none
- type: conditional
conditions:
- entity: binary_sensor.mouse_trap_2
state: 'on'
elements:
- type: state-icon
entity: binary_sensor.mouse_trap_2
icon: mdi:rodent
style:
'--iron-icon-height': 1.7vw
'--iron-icon-width': 1.7vw
'--paper-item-icon-active-color': '#FFFFFF'
'--paper-item-icon-color': '#FFFFFF'
align-items: center
background-color: '#CC0000'
border-radius: 100%
box-shadow: '0px 0px 28px 0px rgba(0,0,0,0.39)'
display: flex
height: 3vw
justify-content: center
top: 86%
left: 12%
margin-left: '-1.5vw'
margin-top: '-1.5vw'
transform: scale(1.2)
width: 3vw
tap_action:
action: none
- type: conditional
conditions:
- entity: binary_sensor.mouse_trap_3
state: 'on'
elements:
- type: state-icon
entity: binary_sensor.mouse_trap_3
icon: mdi:rodent
style:
'--iron-icon-height': 1.7vw
'--iron-icon-width': 1.7vw
'--paper-item-icon-active-color': '#FFFFFF'
'--paper-item-icon-color': '#FFFFFF'
align-items: center
background-color: '#CC0000'
border-radius: 100%
box-shadow: '0px 0px 28px 0px rgba(0,0,0,0.39)'
display: flex
height: 3vw
justify-content: center
top: 86%
left: 20%
margin-left: '-1.5vw'
margin-top: '-1.5vw'
transform: scale(1.2)
width: 3vw
tap_action:
action: none
##### BUTTONS #####
- type: 'custom:button-card'
icon: mdi:glass-wine
name: Mysbelysning
tap_action:
action: call-service
service: scene.turn_on
service_data:
entity_id: scene.mysbelysning
styles:
card:
- height: 115%
- background-color: '#2B2D2F'
name:
- text-transform: uppercase
- font-weight: 600
- font-size: 15px
- color: "#FFFFFF"
icon:
- color: '#FFFFFF'
style:
transform: none
bottom: -15%
left: 0
width: 12%
height: 15%
background-color: '#2B2D2F'
- type: 'custom:button-card'
icon: mdi:weather-night
name: Godnatt
tap_action:
action: call-service
service: scene.turn_on
service_data:
entity_id: scene.godnatt
styles:
card:
- height: 115%
- background-color: '#2B2D2F'
name:
- text-transform: uppercase
- font-weight: 600
- font-size: 15px
- color: "#FFFFFF"
icon:
- color: '#FFFFFF'
style:
transform: none
bottom: -15%
left: calc(12% + 6px)
width: 12%
height: 15%
background-color: '#2B2D2F'