you’re welcome.
Just keep in mind that lowering too much that value is prone to give false away states.
I configured it with an higher timeout (4 minutes) and paired it with bluetooth tracking.
Yes, something like that.
Keep in mind that what’s inside known_devices.yaml can be autogenerated.
I wrote my example by hand without checking my home assistant configuration.
the group part must be placed in group.yaml file if you are using it. Otherwise in configuration.yaml.
check here how to group entities together:
but… bluetooth state change continuosly (every 10 seconds) from Home to Away… it is not stable… even if they are within 1 meter of the raspberry …why???
I don’t see any unwanted state change on bluetooth also at ~15 meters from the pi.
The 10 seconds that you made on the bluetoot_tracker looks suspicious. I won’t scan too often. If you miss one scan you have false positives.
If you have wifi at 5 minutes, why scan bluetooth so often?
I would make both 5 minutes.
The idea behind this configuration is that if wifi or bluetooth fails, the other can report correctly.
the truth table for the group is always
ON ON => ON
ON OFF => ON
OFF ON => ON
OFF OFF => OFF
Instead of check for a device at home, you have to test if the group is at home or away.
The first time it toggle from Home to not home is at the same time for both bt and wifi. The second time only on wifi.
It does not happen with my configuration. I know that bt can be more unstable and depends on the phone type.
As said before: you are using the consider_home at 10 seconds. That’s your toggling trigger.
If you leave it out like the configuration that I wrote to you it won’t happen in my opinion.
I have the exact setup that you are wanting to accomplish.
I am using this app posted by @runningman84 that I would like to thank.
At the moment it works without any modification. I would like to make a couple of changes and I didn’t check until now how to send the notification. I set it up yesterday.
I am quite happy with it for the moment and I would like to recommend it.
regards
Andrea
PS: from which part of Italy are you from?
PPS: I think that if you set up correctly the device tracker you should set as solved this post and open another one with a new title, new subject, new task…