-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbinary_sensors.yaml
executable file
·66 lines (62 loc) · 1.91 KB
/
binary_sensors.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
- platform: workday
country: US
- platform: ping
name: Internet Connection
host: 8.8.8.8
#scan_interval: 600
- platform: template
sensors:
trash_day:
friendly_name: "Trash Day"
value_template: >-
{{ is_state('sensor.day_of_the_week', 'Wednesday') }}
- platform: template
sensors:
phone_presence:
friendly_name: "Phone Presence"
device_class: presence
value_template: >-
{{ states.sensor.bluetooth_presence_probability.state | int > 50 or is_state('device_tracker.iphone', 'home') }}
car_presence:
friendly_name: "Car Presence"
device_class: presence
value_template: >-
{{ is_state('binary_sensor.garage_car_present', 'on') or is_state('binary_sensor.car_approaching', 'on') or is_state('device_tracker.car_gps', 'home') }}
homekit_presence:
friendly_name: "HomeKit Presence"
device_class: presence
value_template: >-
{{ is_state('input_boolean.homekit_presence', 'on') }}
motion_presence:
friendly_name: "Motion Presence"
device_class: presence
value_template: >-
{{ is_state('group.motion_sensors', 'on') }}
delay_off:
minutes: 2
presence:
friendly_name: "Presence Status"
device_class: presence
value_template: >-
{{ is_state('binary_sensor.bayesian_presence', 'on') }}
- platform: bayesian
prior: 0.15
name: Bayesian Presence
device_class: presence
probability_threshold: 0.50
observations:
- entity_id: 'binary_sensor.phone_presence'
prob_given_true: 0.6
prob_given_false: 0.05
platform: 'state'
to_state: 'on'
- entity_id: 'binary_sensor.homekit_presence'
prob_given_true: 0.25
prob_given_false: 0.05
platform: 'state'
to_state: 'on'
- entity_id: 'binary_sensor.car_presence'
prob_given_true: 0.25
prob_given_false: 0.05
platform: 'state'
to_state: 'on'