[SOLVED] Help to create a rule "turn on a lamp when motion is detected but only after sunset until sunrise"

As a start I’d look into

This post