Turn Lights On Only if After Sunset and If Presence is Detected

This post from 3h ago should also solve your question: