-
Notifications
You must be signed in to change notification settings - Fork 8
/
security.yaml
326 lines (326 loc) · 12.6 KB
/
security.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
background: center / cover no-repeat fixed url('/local/lovelace/bg_long.png?v=1')
kiosk_mode:
mobile_settings:
hide_header: true
views:
- icon: 'mdi:shield-home'
badges: []
cards:
- type: vertical-stack
cards:
- type: 'custom:button-card'
size: 25px
icon: 'mdi:close'
tap_action:
action: navigate
navigation_path: /lovelace/0
styles:
card:
- width: 40px
- height: 40px
- background-color: 'rgba(255,255,255,0)'
- box-shadow: none
- margin-bottom: 15px
icon:
- margin-left: px
- type: markdown
content: '### Security'
card_mod:
style: |
ha-card {
background: rgba(0,0,0,0);
box-shadow: none;
padding: 0px;
margin-bottom: -35px;
top: -20px;
left: 5px;
}
- type: 'custom:mod-card'
card_mod:
style: |
ha-card {
width: 92%;
margin: auto;
}
card:
type: horizontal-stack
cards:
- type: 'custom:button-card'
entity: alarm_control_panel.abode_alarm
name: Alarm
icon: 'mdi:shield-home-outline'
show_state: true
aspect_ratio: 1/1
card_size: 3
size: 30%
tap_action:
action: call-service
service: |
[[[
if (states['alarm_control_panel.abode_alarm'].state == "disarmed")
return "alarm_control_panel.alarm_arm_home";
return "alarm_control_panel.alarm_disarm";
]]]
service_data:
entity_id: alarm_control_panel.abode_alarm
code: 1914
hold_action:
action: call-service
service: |
[[[
if (states['alarm_control_panel.abode_alarm'].state == "disarmed")
return "alarm_control_panel.alarm_arm_away";
return "alarm_control_panel.alarm_disarm";
]]]
service_data:
entity_id: alarm_control_panel.abode_alarm
code: XXXX
styles:
icon:
- left: 15px
- top: '-25px'
- color: |
[[[
if (states['alarm_control_panel.abode_alarm'].state == "disarmed")
return "rgba(24, 199, 71,1)";
return "rgba(230, 0, 0,0.7)";
]]]
card:
- background: |
[[[
if (states['alarm_control_panel.abode_alarm'].state == "disarmed")
return "rgba(255,255,255,0.1)";
return "rgba(255,255,255,0.7)";
]]]
- border-radius: 12px
- box-shadow: 5px 5px 5px;
- font-size: 100%
grid:
- grid-template-areas: '"i" "n" "s"'
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content
img_cell:
- align-self: start
- text-align: start
name:
- justify-self: start
- padding-left: 10px
- margin-top: '-65px'
- color: |
[[[
if (states['alarm_control_panel.abode_alarm'].state == "disarmed")
return "white";
return "black";
]]]
state:
- justify-self: start
- padding-left: 10px
- margin-top: '-32px'
- color: |
[[[
if (states['alarm_control_panel.abode_alarm'].state == "disarmed")
return "white";
return "black";
]]]
- type: 'custom:button-card'
entity: lock.front_door_lock
name: Front Door
show_state: true
aspect_ratio: 1/1
card_size: 3
size: 25%
tap_action:
action: call-service
service: |
[[[
if (states['lock.front_door_lock'].state == "locked")
return "lock.unlock";
return "lock.lock";
]]]
service_data:
entity_id: lock.front_door_lock
styles:
icon:
- left: 15px
- top: '-25px'
- color: |
[[[
if (states['lock.front_door_lock'].state == "unlocked")
return "rgba(230, 0, 0,0.7)";
return "white";
]]]
card:
- background: |
[[[
if (states['lock.front_door_lock'].state == "locked")
return "rgba(255,255,255,0.1)";
return "rgba(255,255,255,0.7)";
]]]
- border-radius: 12px
- box-shadow: 5px 5px 5px;
- font-size: 100%
grid:
- grid-template-areas: '"i" "n" "s"'
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content
img_cell:
- align-self: start
- text-align: start
name:
- justify-self: start
- padding-left: 10px
- margin-top: '-65px'
- color: |
[[[
if (states['lock.front_door_lock'].state == "unlocked")
return "black";
return "white";
]]]
state:
- justify-self: start
- padding-left: 10px
- margin-top: '-32px'
- color: |
[[[
if (states['lock.front_door_lock'].state == "unlocked")
return "black";
return "white";
]]]
- type: 'custom:button-card'
entity: lock.rear_door_lock
name: Rear Door
show_state: true
aspect_ratio: 1/1
card_size: 3
size: 25%
tap_action:
action: call-service
service: |
[[[
if (states['lock.rear_door_lock'].state == "locked")
return "lock.unlock";
return "lock.lock";
]]]
service_data:
entity_id: lock.rear_door_lock
styles:
icon:
- left: 15px
- top: '-25px'
- color: |
[[[
if (states['lock.rear_door_lock'].state == "unlocked")
return "rgba(230, 0, 0,0.7)";
return "white";
]]]
card:
- background: |
[[[
if (states['lock.rear_door_lock'].state == "locked")
return "rgba(255,255,255,0.1)";
return "rgba(255,255,255,0.7)";
]]]
- border-radius: 12px
- box-shadow: 5px 5px 5px;
- font-size: 100%
grid:
- grid-template-areas: '"i" "n" "s"'
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content
img_cell:
- align-self: start
- text-align: start
name:
- justify-self: start
- padding-left: 10px
- margin-top: '-65px'
- color: |
[[[
if (states['lock.rear_door_lock'].state == "unlocked")
return "black";
return "white";
]]]
state:
- justify-self: start
- padding-left: 10px
- margin-top: '-32px'
- color: |
[[[
if (states['lock.rear_door_lock'].state == "unlocked")
return "black";
return "white";
]]]
square: true
- type: markdown
content: '### Alarm Trigger Sensors'
card_mod:
style: |
ha-card {
background: rgba(0,0,0,0);
box-shadow: none;
padding: 0px;
margin-bottom: -12px;
left: 5px;
}
- type: entities
entities:
- entity: binary_sensor.entry_front
- entity: binary_sensor.entry_garage
- entity: binary_sensor.entry_rear
- entity: binary_sensor.motion_family_rm
- entity: binary_sensor.slider_front_rm
- entity: binary_sensor.slider_master
- entity: binary_sensor.slider_family_rm
- entity: binary_sensor.slider_lanai
- entity: binary_sensor.window_office
- entity: binary_sensor.window_master_bath
- entity: binary_sensor.window_laundry
- entity: binary_sensor.window_josh
- entity: binary_sensor.window_cruz
state_color: false
card_mod:
style: |
ha-card {
width: 92%;
margin: auto;
border-radius: 12px;
background: rgba(255,255,255,0.1);
color: white;
--paper-item-icon-color: white;
}
- type: markdown
content: '### Occupancy Sensors'
card_mod:
style: |
ha-card {
background: rgba(0,0,0,0);
box-shadow: none;
padding: 0px;
margin-bottom: -12px;
left: 5px;
}
- type: entities
entities:
- entity: binary_sensor.front_living_room
- entity: binary_sensor.office
- entity: binary_sensor.master
- entity: binary_sensor.kitchen
- entity: binary_sensor.family_room
- entity: binary_sensor.josh
- entity: binary_sensor.cruz
- entity: binary_sensor.upstairs_2
name: Ariel
icon: 'mdi:walk'
state_color: false
card_mod:
style: |
ha-card {
width: 92%;
margin: auto;
border-radius: 12px;
background: rgba(255,255,255,0.1);
color: white;
--paper-item-icon-color: white;
margin-bottom: 15px;
}
title: Security