Possible to use a switch input to set a person entity to "home"?

I have a few automations based on me leaving the house/arriving home.

I wasn’t happy with the time it sometimes took for my location to update, so I bought a Shelly 1 that I’m going to use to monitor the set status of my intruder alarm so I can use that to more quickly trigger the automations, but rather than adding that switch as a trigger in the automations (which in turn would mean I’d have to edit every automation, and edit them again if the switch monitor ever goes faulty), is it possible to use the status of that switch to set me to home/away instead so my existing automations can remain untouched?

The device_tracker.see service might be what you are looking for.

In my case, instead of a switch, I have input_booleans like input_boolean.daniel, and also a device_tracker.daniel etc… I then use this to set the state accordingly.

service: device_tracker.see
data:
  dev_id: "{{ trigger.entity_id.split('.')[1] }}"
  location_name: |
    {% if trigger.to_state.state == "on" %}
        home
    {% else %}
        not_home
    {% endif %}

Thanks, I had tried the device_tracker.see service but I was trying to make it update the status of one of my existing device trackers (I have a tracker from my phone and my router) but I didn’t realise I could just enter in a new tracker ID and the automation would create a brand new tracker for me that I attached to my person, meaning all my existing automations can be left as is.

Just two questions about this:
I would like to set a personX to home if the iphone of personX connects to my wifi.
(to override the slow GPS tracking)

With your approach you will set an input_boolean.iphone_personX to home, when connected.
This input_boolean is then added to the person as a tracker.

  1. Wouldn’t the device_tracker.personX do the same without the additional input_boolean helper?
  2. Is there a rule which tracker of a person is prioritized?

Nope. Last time I checked, it’s not possible to add an input_boolean to a person. Only device trackers can be added. So the input is just there to switch the tracker between home and not_home.

Ah, got it.
It’s the other was around - that makes sense.
My assumption was, that you also have a “generic” device_tracker (router connection) like I have (Fritzbox router).
So, my device_tracker should work on a person - although I have somtimes the impression that it’s not.
Need to investigate this.
Thank you for the clarification!