68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
group:
|
|
martin_presence:
|
|
entities:
|
|
- binary_sensor.martin_presence
|
|
- binary_sensor.martin_presence_delayed
|
|
- binary_sensor.martin_presence_extended
|
|
- binary_sensor.activity_last10
|
|
- binary_sensor.activity_last30
|
|
|
|
binary_sensor:
|
|
- platform: template
|
|
sensors:
|
|
martin_presence_delayed:
|
|
friendly_name: 'Martin Presence - Delayed'
|
|
device_class: presence
|
|
delay_off:
|
|
minutes: 10
|
|
value_template: >-
|
|
{{ is_state('binary_sensor.martin_presence', 'on') }}
|
|
martin_presence_extended:
|
|
friendly_name: 'Martin Presence - Extended Away'
|
|
device_class: presence
|
|
delay_off:
|
|
hours: 24
|
|
value_template: >-
|
|
{{ is_state('binary_sensor.martin_presence', 'on') }}
|
|
|
|
- platform: bayesian
|
|
name: 'Martin Presence'
|
|
prior: 0.5
|
|
probability_threshold: 0.8
|
|
observations:
|
|
- entity_id: 'device_tracker.ping_galaxy_s8'
|
|
prob_given_true: 0.9
|
|
prob_given_false: 0.1
|
|
platform: 'state'
|
|
to_state: 'home'
|
|
- entity_id: 'device_tracker.google_maps_100030983205114312365'
|
|
prob_given_true: 0.9
|
|
prob_given_false: 0.4
|
|
platform: 'state'
|
|
to_state: 'home'
|
|
- entity_id: 'device_tracker.ping_tv'
|
|
prob_given_true: 0.8
|
|
prob_given_false: 0.1
|
|
platform: 'state'
|
|
to_state: 'home'
|
|
- entity_id: 'binary_sensor.activity_last30'
|
|
prob_given_true: 0.7
|
|
prob_given_false: 0.5
|
|
platform: 'state'
|
|
to_state: 'on'
|
|
- entity_id: 'binary_sensor.activity_last10'
|
|
prob_given_true: 0.8
|
|
prob_given_false: 0.2
|
|
platform: 'state'
|
|
to_state: 'on'
|
|
- entity_id: 'input_select.latest_motion'
|
|
prob_given_true: 0.4
|
|
prob_given_false: 0.3
|
|
platform: 'state'
|
|
to_state: 'Bedroom'
|
|
- entity_id: 'sensor.sleep_tracker'
|
|
prob_given_true: 0.5
|
|
prob_given_false: 0.4
|
|
platform: 'state'
|
|
to_state: 'tracking'
|