Home/not_home not working properly with family group?

I hade my home/not_home automations setup properly when I was just looking at my device tracker, but a few days ago I created a group and added me and my gf to it (both using owntracks).

But now the automations won’t trigger anymore, is there something I should know/think about?
I can see the group changing status from home to not_home but for some reason it don’t work as it did before…

1 Like

are you triggering on the group or the individual trackers.

On the group.

Post your automation. See here for posting and maintaining formatting

Also, anything showing up in the log?

family:
  entities:
    - device_tracker.pi_reine
    - device_tracker.pi_ivika

- alias: 'Leaving Home'
  trigger:
    - platform: zone
      entity_id: group.family
      zone: zone.home
      event: leave

- alias: 'Coming Home'
  trigger:
    - platform: zone
      entity_id: group.family
      zone: zone.home
      event: enter

The group can only report 1 status, for device trackers, I don’t know how it acts when a person arrives or leaves home. It may react to the status caused by the last change or think that once one person leaves that the status should change to away since not everyone is home. Look at how group statuses change when you turn on one light in a group to see what I mean. You should probably do an or comparison on the individual trackers. But seeing your config will help.

So you don’t think I could just use the group?

I want everything to shut of when the last person leaves the house and turn on when the first enters.

It would seem that the group should work. It was just a thought because of the way groups turn on and off. I’m guessing you aren’t getting anything in the log.

Not that I can relate to this no…

Try triggering off state rather than zone. Not sure if the group would be tracked by zone.

See this link for setting up the state trigger.

this is mine but for when one of us comes home when the family status changes to home. if it helps at all… just do it in reverse.

hide_entity: False
trigger:

  • platform: state
    entity_id: group.family
    from: ‘not_home’
    to: ‘home’

condition:
condition: time
after: ‘16:00:00’
before: ‘22:00:00’

action:

  • service: light.turn_on
    entity_id: group.all_lights
    data:
    rgb_color: [255, 255, 255]
    brightness: 200
  • delay:
    minutes: 3
  • service: light.turn_off
    entity_id:
    • light.dining_room_light
    • light.bedroom_light
1 Like