-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbinary_sensor.yaml
More file actions
393 lines (385 loc) · 13.9 KB
/
binary_sensor.yaml
File metadata and controls
393 lines (385 loc) · 13.9 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
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
- platform: iss
- platform: linode
nodes:
- 'linode2008320'
- platform: bayesian
prior: 0.6
name: 'Bayesian Presence Dan'
probability_threshold: 0.82
observations:
- entity_id: 'device_tracker.dan2_ping'
prob_given_true: 0.9
prob_given_false: 0.1
platform: 'state'
to_state: 'home'
- entity_id: 'device_tracker.dan_pixel2'
prob_given_true: 0.9
prob_given_false: 0.2
platform: 'state'
to_state: 'home'
- entity_id: 'device_tracker.dan_gpslogger_2'
prob_given_true: 0.9
prob_given_false: 0.4
platform: 'state'
to_state: 'home'
- platform: bayesian
prior: 0.6
name: 'Bayesian Presence Shelley'
probability_threshold: 0.82
observations:
- entity_id: 'device_tracker.shelley_ping'
prob_given_true: 0.9
prob_given_false: 0.1
platform: 'state'
to_state: 'home'
- entity_id: 'device_tracker.shelley_op3'
prob_given_true: 0.9
prob_given_false: 0.2
platform: 'state'
to_state: 'home'
- entity_id: 'device_tracker.shelley_gpslogger_2'
prob_given_true: 0.9
prob_given_false: 0.4
platform: 'state'
to_state: 'home'
- platform: uptimerobot
api_key: !secret uptimerobot_api_key
- platform: template
sensors:
home_power_status:
friendly_name: 'Home Power Status'
#delay_off:
# seconds: 90
#device_class: power
value_template: >-
{%- if is_state("binary_sensor.home_power", "on") -%}
True
{%- elif is_state("binary_sensor.home_power", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
True
{%- endif -%}
# icon_template: >-
# {% if is_state("binary_sensor.home_power", "on") %}
# mdi:power-on
# {% elif is_state("binary_sensor.home_power", "off") %}
# mdi:power-off
# #This accounts for no state during startup until the sensor registers
# {% else %}
# mdi:power-on
# {% endif %}
entity_id: binary_sensor.home_power
camera_basement:
friendly_name: 'Camera Basement'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_basement", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_basement", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_basement
camera_backyard:
friendly_name: 'Camera Backyard'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_backyard", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_backyard", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_backyard
camera_craftroom:
friendly_name: 'Camera Craft Room'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_craftroom", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_craftroom", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_craftroom
camera_driveway:
friendly_name: 'Camera Driveway'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_driveway", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_driveway", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_driveway
camera_frontwalk:
friendly_name: 'Camera Front Walk'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_frontwalk", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_frontwalk", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_frontwalk
camera_garage:
friendly_name: 'Camera Garage'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_garage", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_garage", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_garage
camera_gatepatio:
friendly_name: 'Camera Gate/Patio'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_gatepatio", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_gatepatio", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_gatepatio
camera_livingroom:
friendly_name: 'Camera Living Room'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_livingroom", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_livingroom", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_livingroom
camera_patio:
friendly_name: 'Camera Patio'
device_class: motion
value_template: >-
{%- if is_state("binary_sensor.blue_iris_patio", "on") -%}
True
{%- elif is_state("binary_sensor.blue_iris_patio", "off") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: binary_sensor.blue_iris_patio
den_ps3_status:
friendly_name: 'Den PS3'
value_template: >-
{%- if is_state("device_tracker.den_ps3", "home") -%}
True
{%- elif is_state("device_tracker.den_ps3", "not_home") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: device_tracker.den_ps3
den_ps4_status:
friendly_name: 'Den PS4'
value_template: >-
{%- if is_state("device_tracker.den_ps4", "home") -%}
True
{%- elif is_state("device_tracker.den_ps4", "not_home") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: device_tracker.den_ps4
den_amp_status:
friendly_name: 'Den AMP'
value_template: >-
{%- if is_state("device_tracker.den_amp", "home") -%}
True
{%- elif is_state("device_tracker.den_amp", "not_home") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: device_tracker.den_amp
den_lgtv_status:
friendly_name: 'Den LG TV'
value_template: >-
{%- if is_state("device_tracker.den_lgtv", "home") -%}
True
{%- elif is_state("device_tracker.den_lgtv", "not_home") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: device_tracker.den_lgtv
kids_tv_status:
friendly_name: 'Kids TV'
value_template: >-
{%- if is_state("device_tracker.kids_tv", "home") -%}
True
{%- elif is_state("device_tracker.kids_tv", "not_home") -%}
False
{%- elif is_state("device_tracker.kids_tv", "away") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: device_tracker.kids_tv
craft_motion:
friendly_name: 'Craft Room Motion'
device_class: motion
value_template: >-
{%- if is_state("sensor.craft_room_motion", "255") -%}
True
{%- elif is_state("sensor.craft_room_motion", "0") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: sensor.craft_room_motion
connection_to_mysql:
friendly_name: 'Connection to MySQL'
value_template: >-
{%- if is_state("sensor.connection_to_mysql", "True") -%}
True
{%- elif is_state("sensor.connection_to_mysql", "False") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
True
{%- endif -%}
entity_id: sensor.connection_to_mysql
#This is used to create a dynamic card on the UI that only shows if there is an event of importance
relevant_alert:
friendly_name: Any Relevant Alerts
value_template: >-
{%- if not is_state("sensor.big_walnut_lsd_status", "Open") -%}
True
{%- elif not is_state("sensor.delaware", "No Emergency") -%}
True
{%- elif not is_state("sensor.franklin", "No Emergency") -%}
True
{%- elif not is_state("sensor.morrow", "No Emergency") -%}
True
{%- elif not is_state("sensor.nws_alerts", "0") -%}
True
{%- else -%}
False
{%- endif -%}
#This is used to create a dynamic card on the UI if the 3d printer is in-use
3d_printer_in_use:
friendly_name: 3D Printer In-use
value_template: >-
{%- if is_state("switch.3d_printer", "on") -%}
True
{%- elif is_state("switch.3d_printer_fan", "on") -%}
True
{%- elif is_state("switch.3d_printer_light", "on") -%}
True
{%- else -%}
False
{%- endif -%}
#These are all used for the Anova cooker
anova_online:
friendly_name: Is Anova Online
value_template: >-
{%- if is_state("sensor.anova_target_temp", "None") -%}
False
{%- else -%}
True
{%- endif -%}
anova_is_timer_running:
friendly_name: 'Is Timer Running'
value_template: >-
{%- if is_state("sensor.anova_is_timer_running", "True") -%}
True
{%- elif is_state("sensor.anova_is_timer_running", "False") -%}
False
#This accounts for no state if cooker is offline
{%- else -%}
False
{%- endif -%}
entity_id: sensor.anova_is_timer_running
anova_is_running:
friendly_name: 'Is Running'
value_template: >-
{%- if is_state("sensor.anova_is_running", "True") -%}
True
{%- elif is_state("sensor.anova_is_running", "False") -%}
False
#This accounts for no state if cooker is offline
{%- else -%}
False
{%- endif -%}
entity_id: sensor.anova_is_running
anova_speaker_mode:
friendly_name: 'Speaker Mode'
value_template: >-
{%- if is_state("sensor.anova_speaker_mode", "True") -%}
True
{%- elif is_state("sensor.anova_speaker_mode", "False") -%}
False
#This accounts for no state if cooker is offline
{%- else -%}
True
{%- endif -%}
entity_id: sensor.anova_speaker_mode
anova_alarm_active:
friendly_name: 'Alarm Active'
value_template: >-
{%- if is_state("sensor.anova_alarm_active", "True") -%}
True
{%- elif is_state("sensor.anova_alarm_active", "False") -%}
False
#This accounts for no state if cooker is offline
{%- else -%}
False
{%- endif -%}
entity_id: sensor.anova_alarm_active
anova_scheduled:
friendly_name: 'Is Scheduled'
value_template: >-
{%- if is_state("input_boolean.anova_scheduled", "on") -%}
True
{%- elif is_state("input_boolean.anova_scheduled", "off") -%}
False
{%- endif -%}
entity_id: input_boolean.anova_scheduled
door_basement_test:
friendly_name: 'Door Basement Test'
device_class: door
value_template: >-
{%- if is_state("sensor.door_basement_raw", "255") -%}
True
{%- elif is_state("sensor.door_basement_raw", "0") -%}
False
#This accounts for no state during startup until the sensor registers
{%- else -%}
False
{%- endif -%}
entity_id: sensor.door_basement_raw