Presence based lights setup - Wrong group trigger

On my end of configuration Yaml I set:

device_sun_light_trigger: 
  device_group: group.myroom

This I interprets as the if any member of group.myroom is available it will trigger the component.

In groups.yaml I have:

anybodyhome:
  name: anybodyhome
  entities:
   - person.zdenek
   - person.radka
   - person.michal
  
myroom:
  name: myroom
  entities:
   - person.zdenek
   - person.radka

Why the component triggers even when nobody from group myroom is at “home” state please?

If your formatting is as shown above it looks to me like your entities are not indented enough. Only one space indented before the dash as opposed to two.

Now its as below and still trigering if “- person.michal” is at home

anybodyhome:
  name: anybodyhome
  entities:
    - person.zdenek
    - person.radka
    - person.michal

myroom:
  name: myroom
  entities:
    - person.zdenek
    - person.radka

any other idea please?

So what is this supposed to do? I don’t see any light_group specified

Also what does the state say for each person in the developer tools?

The states are changing accordingly as I need for the groups and also for the persons. The default is for all lights (which I want) so I did not specified specific group.

Today I commented “anybodyhome” group so I will see how it will act today.

Are you getting any errors in the logs?

Looking at the code on GitHub if there is something wrong with the group specification then by default all devices will trigger the event which is what you are seeing. I would recheck your group and person definitions.

Today I learned there’s an integration called Presence based lights … but referred to as device_sun_light_trigger.

According to its documentation, device_group and light_group are optional. If they are not included, the integration will control all lights in the house for all persons, and device_trackers, it finds in the configuration.

I don’t know why but the behavior you have reported suggests the integration is ignoring the device_group you specified and using all persons it finds.

It again fired the event eventhough i deleted “anybodyhome” group, so you must be right - it is ignoring the groups. I will recheck the configuration.

Update here. I changed person. to device_tracker. and it seems to be working.