I was super excited to see the Bayesian binary sensor by @jlmcgehee21 and implemented it right away for presence detection. Here’s the config:
- platform: 'bayesian'
prior: 0.25
name: 'Rashmi Home'
probability_threshold: 0.95
observations:
- entity_id: 'device_tracker.pi_rashmiphone'
prob_given_true: 0.8
prob_given_false: 0.6
platform: 'state'
to_state: 'home'
- entity_id: 'device_tracker.rashmiappiphone'
prob_given_true: 0.99
prob_given_false: 0.99
platform: 'state'
to_state: 'home'
- entity_id: 'device_tracker.rashmisiphone'
prob_given_true: 0.9
prob_given_false: 0.6
platform: 'state'
to_state: 'home'
- entity_id: 'device_tracker.sonu_sonu'
prob_given_true: 0.99
prob_given_false: 0.99
platform: 'state'
to_state: 'home'
However, despite all the trackers being home
, I am not seeing the right value for binary_sensor.rashmi_home
. The probability is only 0.4
Not sure what am I missing.