Check, whether sun is set in if statement in a rule