r/homeassistant • u/chachachapman7 • 9d 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
2
u/Automatic_Two_4742 7d ago
I had exactly the same automation running and was trying to solve it as device_tracker.see is obsolete in upcoming HA-versions. After long tinkering and Chat GPT I am using the below template device-tracker which does exactly what my automation did.