I’ve been trying to create a couple bayesian sensors that use motion sensors and just can’t seem to figure it out. I’ve read through the previous posts and tried a bunch of things but haven’t gotten very far. Here is my configuration:
- platform: bayesian
name: "Upstairs Bathroom Occupied"
prior: 0.5
probability_threshold: 0.75
observations:
- platform: 'state'
entity_id: 'binary_sensor.upstairs_bathroom_shower_motion_sensor'
prob_given_true: 0.9
prob_given_false: 0.1
to_state: 'on'
- platform: 'state'
entity_id: 'binary_sensor.upstairs_bathroom_motion_sensor'
prob_given_true: 0.9
prob_given_false: 0.1
to_state: 'on'
It never triggers, even though I was thinking it should change to true if either motion sensor activates. I did try changing prior to 0.75 and then it does trigger, but it’s always triggered (which makes sense I guess?)
The motion sensors themselves work and they are classed as motion sensors. Do I have to use Detected instead of on? dev-state shows on and off, so I figured that was correct.
When I pull up the sensor from the states page, Observations is always blank.
Thanks for your help