So I have zone with 2 persons in it, each person has a Unifi Device Tracker. This seems to work great, when I leave the house the Zone changes from 2 to 1. When my wife also leaves it changes from 1 to 0.
The log shows “Home changed to 0”
My automation works if triggered manually but not automatically.
First please repost your yaml using the preformatted code tool YAML is very picky about spacing and indents so we need to see how you did that. The preformat tool preserves that sowne can tell what’s going on.
Did you run a trace on the automation. What does it say?
If it still does not work in the actual test (not the dev test), I found that in my instance, I needed to add a short delay, like 30 seconds, for my ‘away from home’ setting to work. However, I’m using mine based on tracking MAC/IP addresses from my router, so that could be the reason as well, since it needed time to age out of the table.
In general, having a little bit of a delay might help in case the person’s tracking device goes in and out of range quickly.