triggers:
- trigger: state
from: home
entity_id:
- person.a
- person.b
conditions:
- not:
- condition: state
state: home
entity_id:
- person.a
- person.b
I would probably use a template similar to what @Ildar_Gabdullin showed above, but put it in a binary sensor… there are plenty of things you might want to condition on having at least one parent present in the house, so it makes sense to create a reusable entity.
FWIW, instead of using a “Family” person for devices that are communal, you might consider creating a user that is not attached to a person.
Using a template binary sensor is a really good idea! Thanks. You are right with the communal devices btw. But sometimes I also want to check where one of those devices was forgotten in.
There’s plenty of ways to do that with a template sensor. Breaking them off that communal person fixes soooo many other things you’re having to do workarounds for…
For all of those devices I have an area and a label but they never get assigned to a person because exactly what you’re fighting…