I am using the new iOs app and I absolutely love it, I have enabled the tracking function and it work great. Now I want to build som automation when I arrive at work, leaving work etc.
I fist tried with this for a notify when I got home and it works perfect
- alias: Arriving home
trigger:
platform: state
entity_id: device_tracker.iphone_7_plus
from: 'not_home'
to: 'home'
action:
- service: notify.ios_iphone_7_plus
data_template:
message: >
Arrived {{now().strftime("%H:%M den %d %B")}}
Now I want a notify when I leave work, I build in the same way but changed from and to but I won’t work
- alias: Leaving work
trigger:
platform: state
entity_id: device_tracker.iphone_7_plus
from: 'sjofartsverket'
to: 'not_home'
action:
- service: notify.ios_iphone_7_plus
data_template:
message: >
Left work {{now().strftime("%H:%M den %d %B")}}
I read about that that trigger on the ha page but it say it only works with two trackers (iOS I none) But many that webpage isn’t updated. I will give it a try tomorrow. Have you got it to work with the iOS tracker @azeroth12 ?
Ah, you might be right. I have OwnTracks and the iOS app both doing location (might not be based on what you’re saying). I’ll try disabling OwnTracks and see if it triggers when I leave work.
I didn’t realize according to the documentation zone is just for OwnTracks and iCloud.
I did a quick test with zone config instead using from not_home to home (went for a walk) but it didn’t work for me. Let me know if you can get it to work @azeroth12
You’re right, I was switched to away but my ‘left work’ automation message didn’t trigger. Would be nice if zone was added to the iOS presence detection.
Can you show your automation? We both just tried getting an automation to trigger using zone.leave with the iOS location with no luck. My device was set to away but no trigger.
The below works for me; just triggered it a few hours ago Using iOS app 1.0.2. Prior was using OwnTracks but it is now disabled and commented out of the config.
trigger:
platform: zone
entity_id: device_tracker.jwelter_iphone
zone: zone.work
event: leave
Haha you’re right it works fine. I had my suppress notifications switch on! Just tried it with owntracks off and got the notification. (Cheated with fake gps)
@Stimo not sure why yours isn’t working with zone. Maybe something in the logs might help?