Yes that is correct.
You could also use the device tracker entities that is used in the persons.
i actually thought about that, but as the device tracker is linked to the person, i thought that would be redundant, especially as the person state was correctly changing from not_home to home
ok i’ve changed it from entity_id: person.sarah_jane to device_tracker.sarah_jane and we’ll see what happens later today
@chenks - the above trigger method is what I’m using also. I have (maybe too) many location-based automations and all of them use state triggers.
====
I am actually using multiple types of device trackers that funnel into the same person, for redundancy - get more reliable alarm because of that.
so it works using this method.
not sure why it didn’t work using person but does using device_tracker when the same device tracker is set as belonging to that person
That’s what I sayed ![]()
well you’re still using it a different way to how it works for me.
however, the point being made was why it didn’t work when using person, which has the device_tracker linked
so after some testing this is what works for me
alias: When Anyone Arrives Home
description: Automation to turn on the hall light when anyone comes home
triggers:
- trigger: zone
entity_id: device_tracker.sarah_jane
zone: zone.home
event: enter
alias: When Sarah-Jane enters Home zone
- trigger: zone
entity_id: device_tracker.simons_iphone_3
zone: zone.home
event: enter
alias: When Simon enters Home Zone
conditions: []
actions:
- action: light.turn_on
metadata: {}
data: {}
target:
device_id: b7c59356ca04deaccbe01ee607b28734
alias: Turn on hall light
mode: single
using device_tracker from iOS app installed on phones.