Device tracker state

Hi

For some reason, after I switched to ios app device tracker after locative, my automation trigger stopped working.
It looks like this:

  - alias: Left work
    trigger:
      - platform: state
        entity_id: device_tracker.myphone
        from: 'work'
        to: 'not_home'
    action:
      - service: script.turn_on
        data:
          entity_id: script.starthome

I think maybe the state is now reporting is ‘away’ instead of ‘not_home’?

Also, I can’t figure out how to fire the “see” event in dev panel? Can you somebody provide sample json?

you can have a look in the template section of dev tools and paste this:

{{ states.device_tracker.myphone.attributes }}

Figure out by finding the dev-state panel, some how forgot about it.
And yes, thanks @juka for the template panel tip, actually never used it :blush:

It didn’t work for me either, the only one I managed to get to work was from home to not_home. You have to use zone as a trigger instead.

automation:
  trigger:
    platform: zone
    entity_id: device_tracker.myphone
    zone: zone.work
    event: leave

Tried again, triggering with changing state is not working. Even without “from” and “to” conditions.
Only for ios device tracker.

1 Like

Hello,

Maybe i’ve not fully understand how device_tracker works with ios app, but i can’t see my phone in the list of device_tracker in developer tools.

Is it normal ? How can add my phone with his location to my hass dashboard in this case ?

Thx for the help

No, it’s not normal, I do see my phone in the list of dev tools.
Do you see it in known devices?
Did you enabled the location tracking on iphone for ha app?

I found my problem.

device_tracker:

  • platform: luci
    track_new_devices: no

So the phone was in known devices, but with the flag
track: false

i set it to true and it work now :slight_smile:

@Stimo tried your approach as well, not working for me. Looks like ios app is not reporting/updating the location change correctly. Probably will back to locative for now that worked perfected.

Do you still have a problem with the iOS app 1.0.4 that hit the AppStore last night @radinsky? I have not been able to verify if it still not working proper in the new update yet

Yes, with 1.0.4 and 0.43.1 all the same.

The problem is that the ios app notifies correctly when I leave the particular zone, but it is not updating the device tracker status. Take a look at those screenshots:


And my trigger code is

trigger:
  - platform: zone
    entity_id: device_tracker.myphone
    zone: zone.home
    event: leave

but never triggered.

Maybe @robbiet480 knows some known issues or work around?

I’ve also noticed this recently, @radinsky can you submit this issue to github so it can be tracked and hopefully gets fixed? Thx!

Has anyone found a solution for this? I have the same issue as radinsky, I get the push notifications that the location has changed and entered the Home zone, but my status on my phone still shows away. I am behind a reverse proxy, not sure if that makes a difference.

If you force a push to the server using the up arrow in the app does it update?

I am using nginx as a reverse proxy so that should not cause an issue.

Try using a state trigger rather than a zone trigger.

Thanks, I was able to get this going, but uninstalling the app, re-installing it and going through the setup again, originally, it was configured with http access, and I needed https. Works fine now

I also tried to re-install, still not working