Group home / not_home behaviour

Hi there,

I have some very basic automations related to geofencing and set it up by using a group. According to the home assistant documentation it works as follows:

By default when any member of a group is on then the group will also be on . Similarly with a device tracker, when any member of the group is home then the group is home . If you set the all option to true though, this behavior is inverted and all members of the group have to be on for the group to turn on as well.

My groups and automations are like following:
groups.yaml:

family:
  name: Familiy
  entities:
    - person.daniel 
    - person.sandra

My automations are like that:

- id: 'geofencing.leave.turnoff'
  alias: Leave home - switch off climate and lights
  trigger:
    platform: state
    entity_id: group.family
    from: 'home'
    to: 'not_home'
    for:
      minutes: 1
  action:
      [...]

Very basic, like I said. However, the group switches to not_home if I leave the house with my device, but my wife is still home (which is causing them to sit in the dark suddenly).

The logbook also tells me:
[Family] switched to not home by [Daniel]

More to that, I receive a notification by the automation that all has been switched off. When looking in the remote UI while I am away I can see, that the entity person.sandra is still in state “home” (which should leave also the family group in “home”).

What am I doing wrong or what do I miss??

I can’t tell you what you’re doing wrong as the snippets you’ve posted all appear correct, and I manage my home occupancy with groups in the same way and it works as expected.

Strangely for me it behaves the same way as mentioned by @dhaupt.
I solved this by adding

all: true

to the configuration. But I could not find the root cause for this

Ok, found the error.
One of the family members was named wrongly.
Check the correct name of the person entity.
Here is an extract from my groups.yaml

family:
  name: Family
  all: false
  entities:
    - person.xy
    - person.yz

all: false

is not necessary as this the default setting.

2 Likes

@dhaupt Did you manage to solve this?
I have the same issue.

Hi somehow it now works for me without having really changed anything, which seems to be strange.