Third Reality night light sensor

Sensor has motion and illumination, plus basic night light. I’ve tried several flows to activate night light when only motion is detected. Can you suggest When, And , Then. So far everything I’ve tried just leaves night light always on. Thanks

When:
Motion alarm turned on
And (optional):
It’s after sunset
Then:
Turn on light

When:
The motion alarm turned off
Then:
Turn off light