On your trigger On macro, add this
condition, let’s say “if time is between
7:00 am and 10:00 pm”. Then add a step to
your turn On light to Clear a flag, let’s
say 4.
Add Else condition and specify “If time is
between 10:00 pm and 7:00 am”, then add
steps to turn light On and Set flag 4.
On your trigger Off macro, add this
condition “if flag 4 is cleared”.
The result will be that your light will turn
off by the motion sensor only if time is
between 7:00 am and 10:00 pm.