Using motion on with multiple motion sensors as trigger in automation

Hi, I’m using two motion sensors as a trigger on my bedroom lighting. If both sensors do not detect any motion, it will turn off my lights and this automation is working fine.

Now, I would like to add the duration of both sensors stay in no motion before turning off my lights and I do not know how to do it with multiple sensors. For single sensor, we can definite the duration in the For section.

Please advise and thanks.

Create a group with your motion sensors and trigger on that group.