Interesting - my device tracker shows my custom zone states. Perhaps ensure you’re using the same capitalization? Not sure if it makes a difference here, but it does in other areas so might be worth a shot!
This works and triggers when I leave:
trigger:
- platform: state
entity_id: device_tracker.fletch_phone
from: ‘home’
to: ‘not_home’
This doesn’t run when i get to work even though the device tracker has up dated to work (Could be capitalization)
trigger:
- platform: state
entity_id: device_tracker.fletch_phone
to: ‘work’
If the trigger code looks sound ill do some more tests and see if I can work it out.
Hey guys
Just to update when ended up working for me so that it might help someone else.
for the automation of a device_tracker time when the display says Home then use ‘home’ as the state, when away use ‘not_home’ and when in a zone use the zone name eg ‘Work’
in Automation…
alias: Mark as home
trigger:
platform: state
entity_id: device_tracker.phone
to: ‘home’
action:
I wrote a custom integration for Life360. Life360 has “places”, which are effectively equivalent to HA Zones. Of course, in Life360 I had a “Home” place. The Device Tracker component will accept a location name from the platform implementation. But I had to make sure, in my Life360 platform implementation, to change “Home” to “home”, otherwise it messed up the Device Tracker component. All other “place” names were fine, including None (i.e., not in any Life360 “place.”)
So now I have three different "Home"s: HA’s location, a Home Zone, and Life360’s Home Place. But they all correspond to “home” (all lower case) for the device_tracker state. LOL!
But, bottom line, yes, for the device_tracker state, “home” is for the location defined for your HA system (and your Home Zone if you have one defined), “not_home” for anywhere that is not in a Zone, and the Zone’s exact name (with correct capitalization) when you’re in a Zone.