Group of people: can't select 'home' in change

Hello,

I want to run a defined action whenever two specific people are leaving my home. For this purpose I have created a simple group of persons with two members in my configuration.yaml:

group:
  parents:
    name: Eltern
    icon: mdi:home-heart
    entities:
      - person.johannes
      - person.patricia

The group status is showing 'home. However, I can’t select ‘home’ in the from-definition of my trigger in an automation. I manually switched from home to away and back for each person, but that’s not changing anything.

What mistake am I making?

You might be using the wrong type of trigger.
I use the Zone trigger for select persons leaving the house: Zone Trigger
You can pick multiple persons so you do not have to create a group for them.

Thank your four answer. :slight_smile:

This is only working if you allow geo-location. I am using device trackers, i.e. the phones hooked up to the local WiFi.

Can you post the automation you created? And what integration are u using for the wifi tracking? Unifi or something else?
In the past i had an automation setup for the in-laws so the heating would turn on when their phones entered home

Also in the past the random MAC settings in IOS and Android would be problematic for this kind of detection.

I am using the UI where the selector ‘home’ is not showing. It is part of a bigger automation that includes window sensors to shut off a towel radiator. The standard heating is underfloor, which I don’t touch here (0.1 °C/hr change when switched off). I can try to put the from directly into the yaml but that’s not the way it is supposed to work, is it? :innocent:

Device tracker is with German “Fritz Box Tools”. Trust me, it is working :slight_smile:

Reason i asked for the automation is to also see what kind of trigger are using. Otherwise i can just give general advice.

For example a device trigger might not have that state but the entity will.

In my case with the unifi integration a device trigger will only show Zones i have setup but does not contain home and away
But the entity does have those.

I see. Here is the YAML part:

alias: Heizkörper Bad Eltern - Sperre
description: Schließt das Thermoventil, wenn ein Fenster mind. 1 min geöffnet ist
triggers:
  - trigger: state
    entity_id:
      - group.parents
    from: null
  - entity_id:
      - binary_sensor.hm_sec_sc_jeq0069958
      - binary_sensor.fenstertur_bad_eltern_kipp
    to:
      - "on"
      - unknown
    for:
      hours: 0
      minutes: 0
      seconds: 30
    trigger: state
    from:
      - "off"

As I wrote, I can’t select ‘home’ in the UI, which looks like this: no 'home, no ‘away’

I can of couse check on combinations of the two persons’ states rather than using the group, but this increases condition complexity.

You can type “home” in though. The trigger dropdown cannot know all possible values of your sensor.

The group integration does not supply possible states to the automation/script editor like that. For a group of person entities the available states are home or not_home as shown in the following table from Integrations - Groups - Old Style Groups:

Thank you, I know :slight_smile:

Will switch to checking individual persons then.

Or you could see my post above and supply the trigger home criterion by typing it in.

In the UI:

YAML view to make sure it’s worked:

1 Like

I created a binary sensor that tests the state of individuals instead of a group.

- binary_sensor:
   - name: "Eltern Anwesenheit"
     unique_id: unique_id_eltern_anwesenheit
     device_class: presence
     icon: mdi:account-multiple-check
     state: >
       {{    is_state('person.johannes', 'home')
          or is_state('person.patricia', 'home') }}

The sensor is either on or off, which translates into home or away.

EDIT: @Troon , I saw your edit too late.

1 Like