#Trigger an automation when no creatures are home

1 messages · Page 1 of 1 (latest)

gleaming loom
#

I want to trigger my vacuum only when myself and all of the dogs have left home.

I have a trigger like so:

triggers:
  - entity_id:
      - zone.home
    to: "0"
    for:
      hours: 0
      minutes: 1
      seconds: 0
    trigger: state

I see that zone.home is an integer that represents how many persons are home, so afaict that will only consider me, not the dogs. How can I factor in the dogs here too? They have tile trackers on, so they've got their own entities like device_tracker.fido

#

I think I might want some kind of custom entity group that says "all of these specified entities are not home"

indigo cove
#

you could make a person for each dog and assign the device tracker to the person. that way it will count the dogs as people and add them to the count

gleaming loom
#

I ended up using a custom group entity like so:

group:
  home_members:
    name: "Home members"
    all: false
    entities:
      - person.me
      - device_tracker.fido

It is "Home" if any members are home, or "Away" if all members are away