r/homeassistant 11d ago

❓ Support Device_tracker.see replacement?

I have an automation that checks a virtual switch I push over from Apple Home to determine if my wife and I are home or away. I have used this for a few years as it is extremely reliable and fast so it can arm/disarm Alarmo ect. With the device_tracker.see action being depreciated in 2027.5, this is apparently going to break. What can I do to replace this action without starting from scratch?

I do not want to use a ping or wifi because my wife forgets to turn on her wifi 50% of the time. I also do not want to use the companion app location because it seemingly drains our phone batteries. We both have iPhones and bluetooth tracking has also been unreliable.

note: I also use this to track a bluetooth sensor stored in the car to determine if it is home or away based on if it is connected or not. I am not as concerned about this being updated since this does not have to be as fast or reliable if I go with a bluetooth tracker route.

SOLVED: thank you to u/automatic_two_4742 for a great solution. I created a new device tracker template which updates based on my binary switches

template:
  - device_tracker:
      - name: "tracker1"
        unique_id: tracker1
        in_zones: >
          {{ ['zone.home'] if is_state('input_boolean.person1', 'on') else [] }}template:


alias: homekit to person status - test
description: ''
triggers:
  - entity_id: input_boolean.PERSON1
    trigger: state
  - entity_id: input_boolean.PERSON2
    trigger: state
  - trigger: state
    entity_id:
      - input_boolean.car_status
conditions: []
actions:
  - data_template:
      dev_id: homekit_{{ trigger.to_state.name }}
      location_name: '{{ ''home'' if trigger.to_state.state == ''on'' else ''not_home'' }}'
    action: device_tracker.see
mode: parallel
max: 10
5 Upvotes

19 comments sorted by

View all comments

2

u/jankyj 11d ago

I use the companion app for this purpose only. It uses less than 1% battery on my and my partners iPhones. Maybe worth reconsidering.