Template in a group?

Hopefully this isn’t too dumb a question, but is it possible to template the entities in a group? Something like this:

group_name:
  name: My Group
  value_template: 
    entities: >-
        '{%- if is_state("device_tracker.person", "Home")-%}
          {{ "device_tracker.person" }}
          {%- else -%}
          {{ "sensor.person_location" }}
         {%endif%}'

I don’t think so, but you could make a template sensor for each person that makes that decision. Then add those sensors into a group.

Also, If you set up zones:

You’ll get Home, Away (when not in a zone), and Zone (for each zone you make).