Troubleshooting: Turning lights on and off based on user home

Hello,

I have three automations.

  1. Night Outside-ON: This is supposed to turn on when it is dark and someone is not home. LINE 65
  2. Night Outside-OFF (sunlight): This is supposed to turn off outside lights if there is sunlight LINE 361
  3. Night Outside-OFF (Person): If everyone is home this should turn off outside lights off. LINE 408

OutsideLights - Pastebin.com

My groups.yaml file has the following within it

All_Home:
  name: HAGroupEveryoneHome
  entities:
    - person.christian
    - person.kevin
    - person.marco
  all: "true"

The lights do turn on when they are supposed to, but they never turn off based on user presence. They always turn off in the morning.

My group for being home and away is absolutely working. I switches from Home to Away, whenever one of us leaves the house with our phone. It just appears that the automation logic is incorrect or I do not know how to properly build it.


  trigger:
  - platform: state
    entity_id: group.all_home
    from: 'true'
    to: 'false'

Check the state of this group in Developer Tools —> States. I don’t think that its state is „true“ or „false“.

I learned something new.
You are correct, it has home or away
No true or false.

Will update my automations and report back tomorrow.