-
Notifications
You must be signed in to change notification settings - Fork 12
/
apps.yaml
565 lines (533 loc) · 15.7 KB
/
apps.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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
---
global_modules:
- global_user_id
global_user_id:
class: GlobalUserInfo
module: lights
user_id: 5851a5ea934047d5943e66b3012ac053
tracker:
class: IrkTracker
module: irk_tracker
#log: irk_tracker_log
training_input_text: input_text.irk_tag
data_loc: tracker_logs/
rows_per_flush: 100
identities: !secret irk_tracker_identities
# Example -- TODO document how to retrieve IRK for devices
# - device_name: 'david phone'
# irk: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXF
# person: david
# - device_name: 'david watch'
# irk: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# person: david
# - device_name: 'partner phone'
# irk: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# person: aysylu
# - device_name: 'partner watch'
# irk: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# person: aysylu
device_deactivators: # TODO lol
'david watch': sensor.davids_apple_watch_battery_state.battery_status in [NotCharging, Charging]
away_tracker_arrival_delay_secs: 120
away_trackers:
- person: david
tracker: device_tracker.david_iphone
home_focused_tracker: device_tracker.david_fused
- person: aysylu
tracker: device_tracker.aysylu_iphone
home_focused_tracker: device_tracker.aysylu_fused
pullout_sensors:
- entity: binary_sensor.garage_occupied
from: 'on'
to: 'off'
within_top: 2
nearest_beacons:
- garage_assistant
rssi_adjustments:
bedroom_blinds: 15
living_room_blinds: 12
tracking_window_minutes: 3
tracking_min_superplurality: 1.3
ping_halflife_seconds: 60
# uncomment to enable the coupling of irk to presence sensing
#room_presence:
# downstairs:
# - binary_sensor.basement_occupancy
# david-office:
# - binary_sensor.david_office_occupancy
# aysylu-office:
# - binary_sensor.aysylu_office_occupancy
# bedroom:
# - binary_sensor.bedroom_occupancy
# main-floor:
# - binary_sensor.main_floor_occupancy
# - binary_sensor.kitchen_occupancy
room_aliases:
basement_beacon: downstairs
ep1-david-office:
secondary_clarifiers:
- basement_beacon: main-floor
- ep1-bedroom: david-office
- underbed: david-office
default: david-office
ep1-aysylu-office: aysylu-office
living_room_blinds: main-floor
garage_assistant:
secondary_clarifiers:
- downstairs
- main-floor
- ep1-aysylu-office: main-floor
- ep1-david-office: main-floor
ep1-main-floor: main-floor
bedroom_blinds: bedroom
ep1-bedroom: bedroom
ep1-kitchen:
secondary_clarifiers:
- main-floor
- aysylu-office
- basement_beacon: main-floor
underbed:
secondary_clarifiers:
- main-floor
- bedroom
- garage_assistant: main-floor
default: bedroom
#example_light:
# class: foo
# module: foo
# triggers:
# - presence:
# - sensor1
# - sensor2
# delay_on: 0s
# delay_off: 30s
# turns_on: True
# turns_off: True
# transition: 4
# - presence:
# - adjacent_room_sensor1
# - adjacent_room_sensor2
# delay_on: 5s
# delay_off: 0s
# max_brightness: 30%
# turns_on: True
# turns_off: True
# transition: 5
# - task: doing_a_thing
# turns_on: True
# turns_off: False
# fake_when_away: True
# people_trackers:
# - device_tracker.david_iphone
# - device_tracker.aysylu_iphone
# daily_off_time: 04:00:00
# adaptive_lighting: switch.adaptive_lighting_default
living_room_lights:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
state: turned_off
- task: input_boolean.watching_tv
max_brightness: 30%
transition: 8
- presence:
- binary_sensor.main_floor_presence_augmented
delay_off: 120
# - presence:
# - device_tracker.david_fused in [home, just_arrived]
# - device_tracker.aysylu_fused in [home, just_arrived]
adaptive_lighting: switch.adaptive_lighting_default
light: light.living_room
curio_light:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
state: turned_off
- presence:
#- binary_sensor.main_floor_occupancy
- device_tracker.david_fused in [home, just_arrived]
- device_tracker.aysylu_fused in [home, just_arrived]
#- input_text.test_helper_text == sleep
condition: input_boolean.it_is_evening
adaptive_lighting: switch.adaptive_lighting_default
light: light.curio_lights
#debug: True
dining_room_accent_light:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
state: turned_off
- task: input_boolean.watching_tv
state: turned_off
transition: 8
- presence:
- device_tracker.david_fused in [home, just_arrived]
- device_tracker.aysylu_fused in [home, just_arrived]
condition: input_boolean.it_is_evening
adaptive_lighting: switch.adaptive_lighting_default
light: light.dimmable_light_30
dining_room_lights:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
- input_boolean.david_in_bed
state: turned_off
- task: input_boolean.watching_tv
state: turned_off
transition: 8
- presence:
- binary_sensor.main_floor_presence_augmented
delay_off: 120
#- device_tracker.david_fused in [home, just_arrived]
#- device_tracker.aysylu_fused in [home, just_arrived]
adaptive_lighting: switch.adaptive_lighting_default
light: light.dining_table_fan_fixture
david_office_lights:
class: LightController
module: lights
triggers:
- presence:
- binary_sensor.david_office_occupancy
#- input_text.test_helper_text == home
delay_off: 30
adaptive_lighting: switch.adaptive_lighting_default
light: light.david_office
aysylu_office_lights:
class: LightController
module: lights
triggers:
- presence:
- binary_sensor.aysylu_office_occupancy
delay_off: 30
adaptive_lighting: switch.adaptive_lighting_default
light: light.aysylu_office_ceiling
#debug: true
aysylu_office_lamp:
class: LightController
module: lights
triggers:
- presence:
- binary_sensor.aysylu_office_occupancy
condition: input_boolean.it_is_evening
delay_off: 30
adaptive_lighting: switch.adaptive_lighting_default
light: light.aysylu_office_dim_lamp
# debug: true
stairs_lights:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
- input_boolean.david_in_bed
state: turned_off
- task: input_boolean.watching_tv
state: turned_off
transition: 8
- presence:
- device_tracker.david_fused in [home, just_arrived]
- device_tracker.aysylu_fused in [home, just_arrived]
adaptive_lighting: switch.adaptive_lighting_default
light: light.stairs
coffee_table_light:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
- input_boolean.david_in_bed
state: turned_off
- presence:
- device_tracker.david_fused in [home, just_arrived]
- device_tracker.aysylu_fused in [home, just_arrived]
condition: input_boolean.it_is_evening
adaptive_lighting: switch.adaptive_lighting_default
light: light.coffee_table
#debug: True
kitchen_lights:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
- input_boolean.david_in_bed
#- input_text.test_helper_text == sleep
state: turned_off
- presence:
- binary_sensor.main_floor_presence_augmented
- input_boolean.watching_tv
delay_off: 120
#- device_tracker.david_fused in [home, just_arrived]
#- device_tracker.aysylu_fused in [home, just_arrived]
adaptive_lighting: switch.adaptive_lighting_default
light: light.kitchen
downstairs_lights:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
- input_boolean.david_in_bed
state: turned_off
- presence:
- binary_sensor.downstairs_presence_augmented
#- binary_sensor.basement_occupancy
#- device_tracker.david_fused in [home, just_arrived]
#- device_tracker.aysylu_fused in [home, just_arrived]
adaptive_lighting: switch.adaptive_lighting_default
light: light.downstairs
#debug: True
downstairs_geoleaf_light:
class: LightController
module: lights
triggers:
- task:
- binary_sensor.desktop_kl479rj_power_status != unavailable
- binary_sensor.supercomputer_power_status != unavailable
adaptive_lighting: switch.adaptive_lighting_default
light: light.wled
#underbed_light:
# class: LightController
# module: lights
# triggers:
# - presence:
# - binary_sensor.bedroom_occupancy
# delay_off: 30
# adaptive_lighting: switch.adaptive_lighting_default
# light: light.under_bed_light
bedroom_near_light:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
- input_boolean.david_in_bed
- input_boolean.aysylu_in_bed
state: turned_off
- task:
- binary_sensor.someone_in_bed
max_brightness: 30%
- presence:
- binary_sensor.bedroom_presence_augmented
delay_off: 30
adaptive_lighting: switch.adaptive_lighting_default
light: light.bedroom_near
#debug: True
bedroom_far_light:
class: LightController
module: lights
triggers:
- task:
- input_boolean.dna_sleeping
state: turned_off
- task:
- input_boolean.david_in_bed
- input_boolean.aysylu_in_bed
max_brightness: 1%
- presence:
- binary_sensor.bedroom_presence_augmented
delay_off: 30
adaptive_lighting: switch.adaptive_lighting_default
light: light.bedroom_far
#debug: True
garage_light:
class: LightController2
module: lights2
light: light.neopixel_light
#debug: True
basic_thermostat:
class: BasicThermostatController
module: temperature
report_entity: sensor.basic_thermostat_controller
climate_entity: climate.thermostat_2
hourly_weather: weather.home_hourly # optional/default
max_diff_for_heat_pump: 4
heat:
outside_splitpoint: 62
warm_day: 70
cool_day: 72
sleep: 68
away: 64
cool:
outside_splitpoint: 70
warm_day: 74
cool_day: 72
sleep: 68
away: 76
events:
sleep:
name: ios.action_fired
actionName: wind_down
wake:
name: ios.action_fired
actionName: morning_alarm
sleep_fallback_time: "22:00:00"
presence:
- device_tracker.david_fused in [home, just_arrived]
- device_tracker.aysylu_fused in [home, just_arrived]
#- input_boolean.test_helper
outside_openings:
- binary_sensor.patio_door
debug: true
in_bed_tracker:
class: BedStateManager
module: state_mgmt
wake_event: wake_up
away_distance: 60
#TODO this calc distance can be very wrong
#it is 0 when it's wrong?
#device_tracker.aysylu_iphone_app has latitude, longitude, and gps accuracy
iphones:
david:
ssid: sensor.davids_iphone_ssid
charging: sensor.davids_iphone_battery_state
distance: sensor.david_iphone_calc_distance
bed_tracker: input_boolean.david_in_bed
aysylu:
ssid: sensor.aysylu_iphone_ssid
charging: sensor.aysylu_iphone_battery_state
distance: sensor.aysylu_iphone_calc_distance
bed_tracker: input_boolean.aysylu_in_bed
bed_tracker: input_boolean.dna_sleeping
bed_presence:
default: binary_sensor.someone_in_bed
david: binary_sensor.david_s_side
aysylu: binary_sensor.aysylu_s_side
bedtime_start: '21:00:00'
bedtime_end: '5:00:00'
home_ssids:
- 74ax4k
- internetofshxt
evening_tracking:
class: EveningTracker
module: state_mgmt
tracker: input_boolean.it_is_evening
sunset_offset: 0
sunrise_offset: 0
lirr_fetcher:
class: LirrFetcher
module: lirr_fetcher
max_lookback_mins: 45
parking_booker:
class: GoPortParkingController
module: goportparking
username: !secret goportparking_username
password: !secret goportparking_password
parking_pass_email_sensor: sensor.port_washington_parking_pass
plates:
- !secret goportparking_car1
- !secret goportparking_carr2
bedroom_presence:
class: RoomAugmenter
module: state_mgmt
sensor_id: binary_sensor.bedroom_presence_augmented
irk_trackers:
- device_tracker.david_irk
- device_tracker.aysylu_irk
border:
#- binary_sensor.bedroom_occupancy
- binary_sensor.pir_ep1_bedroom
- binary_sensor.david_pir_under_bed
- binary_sensor.aysylu_pir_under_bed
openings: binary_sensor.bedroom_door
closing_grace_period_seconds: 45
room: downstairs
#debug: true
basement_presence:
class: RoomAugmenter
module: state_mgmt
sensor_id: binary_sensor.downstairs_presence_augmented
irk_trackers:
- device_tracker.david_irk
- device_tracker.aysylu_irk
interior: binary_sensor.computer_area_occupancy_detected
border: binary_sensor.garage_entrance_occupancy_detected
room: downstairs
#debug: true
main_floor_presence:
class: RoomAugmenter
module: state_mgmt
sensor_id: binary_sensor.main_floor_presence_augmented
irk_trackers:
- device_tracker.david_irk
- device_tracker.aysylu_irk
border: binary_sensor.main_floor_occupancy
interior:
- binary_sensor.kitchen_occupancy
- binary_sensor.dining_table_occupancy_detected
room: main-floor
#debug: true
#cleaner:
# class: CleaningManager
# module: cleaning_queue
# debug: true
# vacuum: vacuum.roborock_s7_maxv_2
# vacuum_map: camera.roborock_s7_maxv_map
# readiness_timeout_mins: 60
# maintainence_states:
# - 38 # refill clean water
# - 27 # empty dirty
# - 10 # stuck
# pathways:
# "living room":
# # default to open connections
# - dining room
# - litter box
# dining room:
# - area: kitchen
# opening: input_boolean.kitchen_false_door
# before_coord: [ 25477, 30469 ]
# after_coord: [ 26003, 30648 ]
# #- foyer
# # foyer:
# # - opening: binary_sensor.bedroom_hall_door
# # area: bedroom hallway
# # bedroom hallway:
# # - opening: binary_sensor.bedroom_1_door
# # area: bedroom 1
# # before_coord: [ 22, 22 ]
# # after_coord: [ 22, 20 ]
# # - opening: binary_sensor.bedroom_2_door
# # area: bedroom 2
# # before_coord: [ 14, 22 ]
# # after_coord: [ 14, 20 ]
# # - opening: binary_sensor.bedroom_3_door
# # area: bedroom 3
# # before_coord: [ 10, 22 ]
# # after_coord: [ 10, 20 ]
# # - opening: binary_sensor.master_bedroom_door
# # area: master bedroom
# # before_coord: [ 22, 30 ]
# # after_coord: [ 22, 28 ]
# # gated:
# # opening:
# # - binary_sensor.bedroom_1_door
# areas:
# "living room":
# id: 18
# presence:
# - binary_sensor.main_floor_presence_augmented
# - binary_sensor.yet_to_tidy_living_room
# home: true # makes this the area which contains the base
# kitchen:
# id: 16
# presence: binary_sensor.main_floor_presence_augmented
# "dining room":
# id: 17
# presence: binary_sensor.main_floor_presence_augmented
# "litter box":
# zone:
# - 24964
# - 25210
# - 27594
# - 28426
# presence: binary_sensor.main_floor_presence_augmented
#