Tracking with multiple trackers per person

Hello guys,
I need some help.

I want to track multiple people with currently two trackers per person (Fritz!Box, GPS).
I grouped two trackers to a person like this:

groups.yaml

people:
name: Personen
entities:
- group.tracker_tobias
- group.tracker_silke

tracker_tobias:
name: Tobias
entities:
- device_tracker.tobias_s7
- device_tracker.tobias

tracker_silke:
name: Silke
entities:
- device_tracker.silke_s5
- device_tracker.silke

The group status is showing “home” if one tracker is in home zone. Thats great so far! but… I have multiple zones.

What I want to achive is, that when the GPS Tracker is in a Zone and the WiFi Tracker is Unknown the GPS Tracker is used for tracking and group status.

I hope you get the point. English is not my native language.

Thanks

1 Like

I do that like this:

- platform: template
  sensors:
    person1_travel:
      friendly_name: "person1's location"
      value_template: >- 
        {% if is_state("group.person_person1", "home") %} 
          {{ states("input_select.person1_status_dropdown") }}
        {% elif not is_state("device_tracker.person1_mobile", "not_home") %}
          At {{ states("device_tracker.person1_mobile") }}
        {% else %}
          {{ states.sensor.person1s_time_to_home.attributes.duration }} to home
        {% endif %}

The input select comes from this article on non-binary presence detection.

  1. If the person is home, then their status from the dropdown is shown (which will be ‘Home’ or ‘Just Arrived’)
  2. If the device tracker isn’t not_home (eg in no zone) then the name of the zone is shown
  3. Otherwise their travel time from home is shown
2 Likes