Automation motion and stereo

A silly question maybe

I have an automation which turns the lights on based on. Motion and then off after 10 minutes of no motion
I would like, however to add another condition… that if the AVR is on and playing something … then the lights should stay on., toave the turn off automation only if no motion (binary sensor to off for 10 min) AND Nothing playing …

Can one do an AND condition of an automation? s

yes, you can put a condition on the automation and then a condition in the action section, just before the turn_off.