Hello,
I have several presence sensors (Aqara FP1E) and the iBeacon signal of my Android phone (using the companion app as a transmitter and my HA host, which is in the same room as the presence sensors, as the receiver) and now want to combine all of these with a Bayesian sensor to compensate false-negatives of the presence sensors (while I am sleeping) and false-positives of the BLE sensor (when I leave my phone in the room).
I currently have the following YAML:
binary_sensor:
- platform: bayesian
name: "Anwesenheit Bayesian"
prior: 0.5
probability_threshold: 0.8
unique_id: 9872abdc-8ca5-4d66-801d-4685f93126b7
device_class: occupancy
observations:
- platform: template
value_template: >
{{states("binary_sensor.fpe1e_1_presence")=="on"}}
prob_given_true: 0.9
prob_given_false: 0.5
- platform: template
value_template: >
{{states("binary_sensor.fpe1e_2_presence")=="on"}}
prob_given_true: 0.9
prob_given_false: 0.5
- platform: template
value_template: >
{{states("binary_sensor.fpe1e_3_presence")=="on"}}
prob_given_true: 0.9
prob_given_false: 0.5
- platform: template
value_template: >
{{states("device_tracker.handy_aaron_ble")=="home" and states("sensor.handy_aaron_distance")|float(11) < 8}}
prob_given_true: 0.7
prob_given_false: 0.4
However, the binary sensor stays ‘off’ all the time even if all 3 FP1Es are triggered and my phone is within BLE range, the probability
atteibute also stays at 0 all the time.
What could be the cause of this issue?
Best regards
Aaron