Automation no longer working?

I have 2 automations configured for my basement. Both are triggered by a motion detector.

    alias: boff
    trigger:
      platform: state
      entity_id: sensor.basement_motion_sensor
      to: '0'
      for:
        minutes: 5
    action:
      service: light.turn_off
      entity_id:
        - group.basement

    alias: bon
    trigger:
      platform: state
      entity_id: sensor.basement_motion_sensor
      to: '1'
    action:
      service: light.turn_on
      entity_id:
        - group.basement

The automation for ‘boff’ works - after 5 minutes of inactivity from the motion sensor, it turns off the 3 lights in the group.basement group. The issue is with ‘bon’ - it had worked at one time but now it no longer turns on the lights. I can see in the log and debug log file that it is triggering the ‘bon’ automation but it isn’t trying to turn on the lights. I originally had the lights listed individually within the entities section but it made no difference. I’m confused as to what is causing this.

Thanks
Norm

Is the group.basement a light group or a group group? Sounds stupid, but it makes a difference.

If it’s a group group, use homeassistant.turn_on and homeasisstant.turn_off

EDIT: I think it’s a group group because a light group is in the light domain. So, you should be using homeassistant.turn_on:

alias: bon
trigger:
  platform: state
  entity_id: sensor.basement_motion_sensor
  to: '1'
action:
  service: homeassistant.turn_on
  entity_id:
    - group.basement

Ok, gave this a go and it still didn’t work so I removed the 3 bulbs, and add them back in one at a time. Worked on one bulb, two bulbs, then the third caused an error in the log. I will reset the bulb and permit it back into the zha profile and see if it is good to go.

Strange but thanks for the suggestions.