Ok, so I have tried this with both state and zone… I could get it to work for awhile when I left. However, it would never work for my daughter’s phone. Now it just never triggers… At the moment I am an hour late to work, so I am calling it until later tonight…
######################################################################
## Everyone is gone
######################################################################
- alias: 'Everyone is gone'
trigger:
platform: zone
event: leave
zone: zone.home
entity_id: device_tracker.logan_pixel
condition:
- condition: state
entity_id: device_tracker.samsiphone
state: 'not_home'
- condition: state
entity_id: input_boolean.disable_home_away
state: 'off'
action:
- service: script.good_bye
- service: notify.nma
data:
message: "Everyone has left the home"
######################################################################
## Just Dad gone Sam Home
######################################################################
- alias: 'Rule 2 - Just Dad leaves'
trigger:
platform: zone
event: leave
zone: zone.home
entity_id: device_tracker.logan_pixel
condition:
- condition: state
entity_id: device_tracker.samsiphone
state: 'home'
- condition: state
entity_id: input_boolean.disable_home_away
state: 'off'
action:
- service: lock.lock
entity_id: group.all_locks
######################################################################
## Just Sam Leaves
######################################################################
- alias: 'Rule 3 - Just Sam Leaves'
trigger:
platform: zone
event: leave
zone: zone.home
entity_id: device_tracker.samsiphone
condition:
- condition: state
entity_id: device_tracker.logan_pixel
state: 'home'
- condition: state
entity_id: input_boolean.disable_home_away
state: 'off'
action:
- service: lock.lock
entity_id: group.all_locks
- service: notify.nma
data:
message: "Sam has left the house"
I checked the states and input.boolean is in ‘off’ position so I don’t think it is that…
I’m not tracking. I can trigger the automation by itself and it runs. However, changing states on the dev panel get’s me nothing… So I’m screwing something up somewhere.
Changing states in the dev panel doesn’t affect the hardware so it won’t trigger I think, you can change the software parts like input_booleans or state of objects not connected to hardware.
What I did to test mine was create a mqtt json device tracker and published a json gps update from another phone or in my case via the command line ssh) while having the phones you are trackings wifi switched off (so it can’t interfere).
Ahh that makes sense. So there is no way to test the device’s triggering the automation or not outside leaving my home? What is funny is the arrival automation built nearly identically works flawlessly for my phone.
At least I don’t know of any other way :), I just used google for the nearest B&Q and then clicked on the map and in the browser http box the long and lat are given I just copied them into my msg
Damn it lol. Ok, so off to MQTT it is. Talking right now is making me think my daughter’s phone is the damn culprit. I am going to remove her phone, and when I go to get her from soccer practice, I can see if it trips.
Here’s my config - I use zanzito on my samsung but owntracks will do the same thing, so now I can push a msg via the shell and the map will show me in morrisons or b&q or where ever and then I can also push a msg from my phone over data via either owntracks or zanzito to put me back at home (both have either a heatbeat (zanzito) or a forced msg (owntracks), which will push a msg of your current location - provided you have a gps fix)