How to configure a Hue motion sensor so lights are only switched on when dark?

You first need to sign in with your Philips Hue account to control your lights away from home, see: How can I control my lights while away from home?

Note that while away from home functionality is limited. For example, configuring a motion sensor can still only be done when connected on your local network at home.