Automation to control a group

I have 2 light fittings in my lounge, both of which have 6 smart bulbs in them. Each light is then in a group of 6 in HA, using the helpers function. They are named lounge light 1 (bulbs 1-6) and lounge light 2 (bulbs 7-12).

I cannot seem to work out how to make an automation to turn off these 2 groups when a motion sensor stops detecting.

Any ideas?

What do you have so far?

I select an action of ‘helper’ and then ‘group’ but then when I go into group, I don’t know what to select. I tried ‘Set’ but it brings up another screen and I have no idea what to put.

I’ve sorted it. I need to use a light call service.

Thank you anyway