Motion, lights and lux sensor

Hello. I have a motion sensor and light sensor in the same room. I want to achieve the lights staying off if there is no motion detected for 10 minutes but if motion is detected the lights only come on if ambient light levels in the room are low enough to need the lights on. I would also like to set different light levels for different time periods i.e. lower, more relaxed lighting for after the kids are in bed and it’s time to chill!

Any help would be much appreciated

Hi, instead of answering here…please search this forum as this very same topic pops up quite a few times a year.
example: Motion sensor light automation - Configuration - Home Assistant Community (home-assistant.io)