Advertisement
diyfuturism

DIYfuturism.com - Presence Detection Bayesion Binary Sensor

Nov 27th, 2017
2,682
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.15 KB | None | 0 0
  1. #
  2. # Home Assistant YAML
  3. # Bayesian Binary Sensor
  4. # https://home-assistant.io/components/binary_sensor.bayesian/
  5. #
  6. # Observes many device tracker entities to determine if home or not
  7. #
  8. # http://www.diyfuturism.com/index.php/2017/11/26/presence-detection-with-home-assistant-bayesian-probability/
  9. #
  10. - platform: bayesian
  11.   prior: 0.5
  12.   name: 'Brad Presence'
  13.   probability_threshold: 0.9
  14.   observations:
  15.     - entity_id: 'device_tracker.brad_ping'
  16.       prob_given_true: 0.9
  17.       prob_given_false: 0.1
  18.       platform: 'state'
  19.       to_state: 'home'
  20.     - entity_id: 'device_tracker.brad_ios'
  21.       prob_given_true: 0.9
  22.       prob_given_false: 0.2
  23.       platform: 'state'
  24.       to_state: 'home'
  25.     - entity_id: 'device_tracker.brad_owntracks'
  26.       prob_given_true: 0.9
  27.       prob_given_false: 0.4
  28.       platform: 'state'
  29.       to_state: 'home'
  30.     - entity_id: 'device_tracker.brad_nodered'
  31.       prob_given_true: 0.8
  32.       prob_given_false: 0.2
  33.       platform: 'state'
  34.       to_state: 'home'
  35.     - entity_id: 'device_tracker.tile_keys'
  36.       prob_given_true: 0.8
  37.       prob_given_false: 0.4
  38.       platform: 'state'
  39.       to_state: 'home'
Advertisement
Comments
  • wolvverine
    1 year
    # YAML 0.15 KB | 0 0
    1. Currently just add in binary-sensor:
    2.   device_class: presence
    3.  
    4. and in known_devices.yaml change:
    5. - brad_presence:
    6.   name: brad_presence
    7.   track: true
Add Comment
Please, Sign In to add comment
Advertisement