Trigger automation if home state is true for all household members

### Project Energy Effeciency ###
- alias: PEE Outdoor Lights
  trigger:
    platform: state
    entity_id: 
      - group.household
    to: 'home'
  condition:
  - condition: state
    entity_id: 'group.household'
    state: 'home'
  action:
    service: homeassistant.turn_off
    entity_id: 
      - group.lightsoutdoors

Automations: https://pastebin.com/jZJqUM9y
Groups: https://pastebin.com/xJxWvekZ

So I am trying to keep the outside lights on if it is dark and not everyone is home but it does not seem to work. Currently someone is not home, and it is showing the group.household as home. When only two out of three individuals are home.

That is how group works.
I think the only way to do it is to add each member manually as a condition. That way it will only be true when all are home.

1 Like

There is an β€œall” option to change this behaviour. https://www.home-assistant.io/integrations/group/#all

Set it to true and everyone in the group has to be home for the group state to be home.

2 Likes

Thank you Tom, household state is now being detected correctly. My automation is still not working this may be due to changes I made in last few minutes. Will post back with results in a moment.
Group has been modified as listed below.

Household:
  name: Household People
  entities:
    - person.christian
    - person.kevin
    - person.marco
  all: 'true'

I take it back, it probably does work. I manually change the state in developer mode back and forth and saw changes to lights.

I will troubleshoot further tomorrow.