Automation not working when using condition

Hi, I have the following automation in my HASS.IO working fine, which turns on light at specific time in day:

- alias: Turn loght on at specific time
  trigger:
    platform: time
    at: "19:45:00"
  action:
    - service: homeassistant.turn_on
      entity_id:
        - switch.sonoff_pow2

I wanted to add a 2nd condition so light will turn on only if someone is at home (entity group.family state is: ‘home’ ):

- alias: Turn loght on at specific time
  trigger:
    platform: time
    at: "19:45:00"
  condition:
    - condition: state
      entity_id: group.family
      state: 'home'
  action:
    - service: homeassistant.turn_on
      entity_id:
        - switch.sonoff_pow2

But for some reason this modification is not working. Anyone can see an error in my code?

Can’t see anything wrong with your automation. Have you checked that the state for group.family is indeed ‘home’?

Not sure what happened, probably a missing tab or something as now, after many tests, seems to be working fine.

Thanks for the interest anyway.

Regards.