So I have a couple simple automations such as this one which works just fine
- alias: "Leaving Work"
trigger:
- platform: state
entity_id: device_tracker.me_iphone
from: 'Work'
action:
- service: notify.pushbullet_notifications
data:
message: "I have has Left Work"
target:
- email/[email protected]
title: " Location Alert"
I was thinking I’d do something to cover all zones I have set up (I have 4 or 5)
- alias: "Leaving Location"
trigger:
- platform: state
entity_id: device_tracker.me_iphone
to: 'Away'
action:
- service: notify.pushbullet_notifications
data:
message: "I have Left {{ trigger.from_state.state }}"
target:
- email/[email protected]
title: "Location Alert"
I believe this will work, but I remember in some of my other automations I had to use “not_home” even though “away” is what you see in the UI. So my question is, is not home always the same as away, or is that just the state that means your previous location was HOME.
So if I leave work is and have not entered a zone is my state “not_home” or away?
I can test this out, but requires me coming and going a few times. If no one has any input I’ll answer my own question in a day or two after I’vehad some time to verify.
not-home is true when you are not at home AND not in a preset location.
If you have 2 locations overlapping each other, you will not go from [say] zone 1 to not_home to zone 2, so bear this in mind.
For the actual checking if I’m home or not, I instead use {% if states.[device tracker entity name goes here].state != "home" %}