Automation - trigger lights based on motion and presence for a defined time

Apologies for the newbie question…

I am trying to create an automation that will trigger living area lights based on motion, but only in the minutes immediately after arriving home.

I.e. automation will trigger lights based on state of kitchen motion detector changing from ‘clear’ to ‘detected’ AND person entity changed from
‘away’ to ‘home’ some time in the last 2 minutes.

Thanks in advance.

The simplest way is to create a two-minute timer helper and an automation to turn it on when someone comes home, then make the helper being on a condition of the automation that triggers the lights.

Thanks - that’s a very neat solution which should work. Clearly I was overthinking it.