Waze time off on person card

I have a person card for myself and my wife and on that person card i have a bar in the middle that is dependant on the waze integration that tracks our devices distance from home.
I’ve noticed that if we are in the car together, the amount of time almost always has a 3 minute difference between us. My question is, why could this be? My thinking is that if we are in the same vehicle and the same amount of distance from home, why is the time different? Is it the update time on the phone that dictates updating this time? The core reason I am seeking to correct this is because i have a ‘leaving the house’ and a ‘welcome home’ automation that chooses different actions if…

  1. I am leaving the house…
  2. my wife is leaving the house
  3. we are both leaving the house
    and
  4. If i am coming home
  5. If my wife is coming home
  6. we are both coming home together.
    The automation that does these things has been a bit problematic on the choose function because there is a time difference between the time we arrive…even though we are in the same vehicle.
    2024-05-12 01_14_16-Andrew Mobile – Home Assistant - Vivaldi
1 Like

Next time you are in the car together, set up a new panel card with the map.
Add your two devices trackers.
Add history of a few hours.

Now you should be able to see where your phones update the positions and how this relates.

1 Like

It is hard to tell without knowing what you used to set up waze. In general, home/away works best if you combine both gps trackers and other trackers, such as router/wifi based, bluetooth, etc. The person integration can combine these, there’s also this:

Also check the sensor settings in the HA the companion app regarding location. If they are both ios or both android, compare the two and see if you missed something, such as the location zone setting.

And then if you want quick response I would base automations on the combined device tracker and not on the Waze integration, which does not update instantaneous due to polling rate limits. If it is (closer) proximity you are after, use:

Both proximity and the above composite tracker include a direction of travel, which is also helpful.

For your dashbord you could even get creative and create a template which uses Waze for longer distances and a proximity based estimation when you get close.

1 Like

That’s a good idea, I’ll try that

This is how i set the waze tracker, the info is the same for the other device also

“Also check the sensor settings in the HA the companion app regarding location.” I did check the “Location Zone” setting on both the phones and they were both set to 200, i read that increasing this number could increase accuracy, so i set them both to 300…didn’t seem to make a difference, my automation just kicked in when i was further away from the zone, but produced the same unexpected result.

Both phones are android

What exactly do you mean “combined device tracker”? Are you saying put them in a helper? I did try in my automation

This is my latest itterations of welcome home automation

alias: House - Welcome Home
description: "This automation is designed to run whenever coming home. "
trigger:
  - platform: device
    device_id: b5080f0ddc0022d8c3eb83db1c7ca467
    domain: device_tracker
    entity_id: a2a5db3ee20688e8bb87203fe453bd00
    type: enters
    zone: zone.home
    id: ME Coming Home
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - ME Coming Home
          - condition: not
            conditions:
              - condition: zone
                entity_id: person.wife
                zone: zone.home
        sequence:
          - service: notify.mobile_app_my phone
            metadata: {}
            data:
              message: TTS
              data:
                ttl: 0
                priority: high
                media_stream: alarm_stream
                tts_text: Welcome Home ME and Wife
          - service: script.living_room_kodi_power_on
            metadata: {}
            data: {}
          - service: switch.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: switch.mycomputer
          - service: scene.turn_on
            metadata: {}
            target:
              entity_id: scene.office
          - service: scene.turn_on
            metadata: {}
            target:
              entity_id: scene.living_room
      - conditions:
          - condition: trigger
            id:
              - MY Phone
          - condition: zone
            entity_id: person.wife
            zone: zone.home
        sequence:
          - service: notify.mobile_app_myphone
            metadata: {}
            data:
              message: TTS
              data:
                ttl: 0
                priority: high
                media_stream: alarm_stream
                tts_text: Welcome Home ME
          - service: switch.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: switch.computer
          - service: scene.turn_on
            metadata: {}
            target:
              entity_id: scene.office
mode: single

This is my latest itteration of house shutdown automation

alias: House - Shutdown
description: >-
  This automation is designed to turn off all lights, all warmers, all
  televisions, all computers, all light switches when no one is home.
trigger:
  - platform: device
    device_id: b5080f0ddc0022d8c3eb83db1c7ca467
    domain: device_tracker
    entity_id: a2a5db3ee20688e8bb87203fe453bd00
    type: leaves
    zone: zone.home
    id: ME Leaving Home
condition: []
action:
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
  - choose:
      - conditions:
          - condition: trigger
            id:
              - ME Leaving Home
          - condition: not
            conditions:
              - condition: zone
                entity_id: person.wife
                zone: zone.home
        sequence:
          - service: notify.mobile_app_myphone
            metadata: {}
            data:
              message: TTS
              data:
                ttl: 0
                priority: high
                media_stream: alarm_stream
                tts_text: >-
                  I see that you and Hilary are leaving. I have shutdown the
                  house for you.
          - if:
              - condition: device
                device_id: 9aad313c10dbfdad67fc5590ec9d88b5
                domain: media_player
                entity_id: 6c55f2ba4f50740644bc63b3acc26e3b
                type: is_playing
              - condition: device
                device_id: 6e6ac583f0ac6defbd2407b01ea46667
                domain: media_player
                entity_id: f8cf811f5ae953dfb156f71d71d32fe9
                type: is_playing
              - condition: device
                device_id: ca2945d62812439106ee5edd68169f36
                domain: media_player
                entity_id: 805096242f9dac61ca80ca8b35803876
                type: is_playing
              - condition: device
                device_id: fc402d33d94e9f06f6696870f73743d5
                domain: media_player
                entity_id: cab59056fe57c8d3d73fc176ad93cfeb
                type: is_playing
            then:
              - service: kodi.call_method
                metadata: {}
                data:
                  method: Player.Stop
                target:
                  entity_id:
                    - media_player.kodi
                    - media_player.kodi
                    - media_player.kodi
                    - media_player.kodi
          - service: kodi.call_method
            metadata: {}
            data:
              method: system.shutdown
            target:
              entity_id:
                - media_player.kodi
                - media_player.kodi
                - media_player.kodi
          - service: media_player.turn_off
            metadata: {}
            data: {}
            target:
              entity_id:
                - media_player.player 1
                - media_player.player 2
                - media_player.player 3
                - media_player.player 4
          - service: switch.turn_off
            metadata: {}
            data: {}
            target:
              entity_id:
                - switch.mug_warmer
                - switch.kitchen_light_switch
                - switch.all_warmers
      - conditions:
          - condition: trigger
            id:
              - ME Leaving Home
          - condition: zone
            entity_id: person.wife
            zone: zone.home
        sequence:
          - service: notify.mobile_app_my phone
            metadata: {}
            data:
              message: TTS
              data:
                ttl: 0
                priority: high
                media_stream: alarm_stream
                tts_text: I have shutdown your office for you.
          - service: button.press
            metadata: {}
            data: {}
            target:
              entity_id: button.my computer_shutdown
          - type: turn_off
            device_id: a023783c727e9c10422256c09744ed40
            entity_id: 2208f928517345cf59603153c30a79ea
            domain: switch
          - type: turn_off
            device_id: 8ca17555cba59c5f0a5f202aefef8b22
            entity_id: f71004cd1798035ad47fba953bed13de
            domain: switch
          - service: light.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: light.my_office
mode: single

In my person card, the lower left icon is a proximity sensor…I haven’t noticed if those values were different, I was focusing on the waze integration, I’ll have to check if those are different next time we’re out.

Either a person entity in Home Assistant (with multiple device trackers added to one person) or the integration I linked to in my post (Composite) which does the same, better. Check the docs for that to see what it does.

You now use only the phone gps tracker, so that is just one source, no combination.
It is hard to read though, because you use a device trigger. You should avoid those:

Because you only use one single device tracker in the trigger, you do not take full advantage of the person integration. That can use multiple device trackers to determine the location of one person.

What I get from it, is that the automation is not built to detect your wife coming home. It does not use the waze integration at all, so I have no clue why you brought that up. If you did use waze, the polling interval for that would explain a lot.

You can build this way simpler. A first person coming home trigger is simply:

trigger:
  - platform: numeric_state
    entity_id:
      - zone.home
    above: 0

And last person leaving home is:

trigger:
  - platform: state
    entity_id:
      - zone.home
    to: "0"
    not_from:
      - unknown
      - unavailable

These take advantage of the person integration, with the ability to add more trackers to one person, thereby increasing responsiveness and possibly accuracy.

You can also use composite to combine the gps tracker with a wifi based one, and put the composite device tracker in the person settings. As said, refer to the docs of the composite integration for why and how.

Thanks for this, I’ve made some updates to my automations to first avoid the device triggers. I would have to leave the house again to see how it goes.
I brought up the waze integration because there’s a discrepancy in distance reporting, that is an indicator for the mismatched gps coordinates even though they should be the same if we’re together in the same vehicle. Because of the discrepancy, the shown times that we arrive at our home is different and hence causes different automation actions to be taken. No, the waze integration does not use the automation or vice versa.

I installed the composite tracker integration and did a basic setup with both my device and my wifes device but have not yet implemented it in the house automations.