Automation based on group doesn't trigger

Dear all,
I have an automation based on a group composed of members of my family that could trigger if some of the components is detected at home. Unfortunately, this doesn’t occur.
The group is correctly switched to home if only one member is at home but the automation doesn’t trigger
Of course, if I trigger it manually automation work

Someone can help me ?

alias: telecamere
description: ''
trigger:
  - platform: state
    entity_id: group.famiglia
    to: home
condition: []
action:
  - type: turn_on
    device_id: 64a614ff288fb039bb9afbc9fcdef1ab
    entity_id: switch.blueiris_profile_at_home
    domain: switch
mode: single

can you confirm the state of the group? Groups are unique in that they can have many different states. Verify the main state.

Secondly, groups will only cause a trigger when the state changes. If your group is already home or on, it will not change to home or on when another member of the group is home or on. No state change occurs when that happens. It has to go from not_home/off to home/on.

Automation must trigger only when the group state switch from not_home to home.
I can confirm that state changes to not_home when all members are outside and switch to home when almost one member is in.

Then it should be working as your syntax is correct. Verify the spelling of your group entity_id.

if I change automation to this

alias: Spegne telecamere
description: ''
trigger:
  - platform: state
    entity_id: person.demetrio
    to: home
condition: []
action:
  - type: turn_on
    device_id: 64a614ff288fb039bb9afbc9fcdef1ab
    entity_id: switch.blueiris_profile_at_home
    domain: switch
mode: single

where person.demetrio is a single component of group.famiglia, automation triggers without a problem.
I checked the spell of group.famigli and it’s correct.

which one is correct?

group.famiglia

Then it should be working. Have you checked the trace?

if I leave group.famiglia there are no trace because automation doesn’t start

Then the state isn’t what you think it is. Can you post screenshots of the state to back your claims? Developer tools → states page.

this is the state when some of group members at home


and this when not

Alright, then it should be working. Can you screenshot the entity_id please just for verification. Because at this point, that’s the only possibility as to why this isn’t working. I guess the other possibility is that the automation is turned off.

this may help ?

  famiglia:
    name: Famiglia
    entities:
      - person.demetrio
      - person.nada
      - person.chiara

Of course automation is enabled

Then it should be working. Everything you’ve posted is correct and verified. It should trigger when the group naturally changes from not_home to home.

I’ll switch back to entity group.famiglia and give it another try

this is the actual log
immagine
As you can see automation is not triggered

having the same issue. it was working fine until the update to 2022.3.5. I added a guest person as a device tracker controlled by an input boolean. Both the other person entities are home, but when i toggle the guest to home, the entire group changes to home, when i set the guest person to away, the entire group goes to away even though the other two person entities show home. See example here:

poking around some more, i was looking at the history of the person entity for myself and i see that it has status of home but both in green and in blue. does this mean that HA thinks these are different statuses?

posted this in the other thread as well, but just in case someone is monitoring this one instead of the other…

Was digging a bit more and also noticed that in my logbook, the values for home are sometimes different:

I think that may be the crux of the issue. There are only 2 trackers assigned to my person, one is the IOS cloud the other is the HA App. It looks like both of the trackers can use home value with lower case h and also Home with upper case H. not sure if that would cause an issue or not, but assuming the compare done in the group may be case sensitive.

Did you ever find a solution for this? I am on version 2022.5.5 and I’m having the same issue. When someone arrives home, they aren’t triggering the automation.

alias: Alarm - Disarm for Family
description: Testing
trigger:
  - platform: zone
    entity_id: group.some_family
    zone: zone.home
    event: enter
condition: []
action:
  - service: alarm_control_panel.alarm_disarm
    data: {}
    target:
      entity_id: alarm_control_panel.alarmo
mode: single

2022-05-23 15_27_19-Window