I’ve just succesfully created 2 Bayesian binary sensors for presence detection. So far, it seems to be working fairly well. But when I try to publish these sensors to the front end, I only see a badge with our names underneath and nothing else. I also see that these binary sensors return “on” or “off”.
Has anyone implemented a badge in their front end that would show “Home” or “Away”? If so could you share an example? I assume that it would be using a template of some sort. Thanks
Just add…
device_class: 'presence'
to your Bayesian sensor config
Thanks for your reply, I added what you have suggested in your post, but didn’t seem like it worked, as a matter of fact, the bayesian binary sensor was not created. I also didn’t see it in the Documentation. Maybe I didn’t do it right, this is the first part of my bayesian sensor:
- platform: bayesian
device_class: 'presence'
prior: 0.7
name: 'Wife Presence'
probability_threshold: 0.9
observations:
- entity_id: # List of all my entities ...
Did I miss anything or didn’t code it correctly?
Yeah that is pretty much my config which works fine…
- platform: bayesian
prior: 0.75
name: "Bayesian Presence James"
device_class: 'presence'
probability_threshold: 0.95
observations:
- entity_id: "device_tracker.james"
prob_given_true: 0.8
platform: 'state'
to_state: 'home'
The actual state is still on/off but if I add the sensor to a group it shows home/away