If you're like me and turn your porch lights on after the sun goes down, it's sometimes easy to forget to do it every night. However, if you have a Wink hub and a smart bulb or smart switch, you can have your porch light automatically turn on and off based on the sunset and sunrise schedule.

Related: How to Put Your Lights on a Schedule with Wink

We've covered how to do something similar in the past, but that involves setting a specific time for lights to turn on and off. And since the sun sets and rises at vastly different times throughout the year (mostly thanks to daylight savings time), setting a specific schedule is not the best method when it comes to your outdoor lights. Instead, it's better to automatically control lights based on when the sun rises and sets.

The Wink app has a newer feature named Moonlight that automatically turns on any lights when it gets dark outside. It's mostly aimed at users who want to come home to a well-lit house at night, rather than having to fidget with light switches as they walk in. However, Moonlight is also great for automatically turning on my porch light once it gets dark out, so I'll be using that as the example in this guide.

To start off, open up the Wink app on your smartphone and tap the menu button in the top-left corner of the screen.

Next, tap the "Lights + Power" option.

Select the "Services" tab at the top.

Tap "Setup" within the "Moonlight" box.

You'll get a short introduction of what Moonlight is. Swipe left to continue through the intro.

When you get to the end, tap the "Get Started" button at the bottom.

Next, give the Wink app permission to use your location, since it will need that info to know when the sun sets and rises. When that's done, tap the "Ok, Got It" button.

If the app already has your location on file, select it using the radio button on the right side and hit "Next" at the bottom. Otherwise, tap "New Location" to enter in your address.

On the next screen, select which lights you want Moonlight to control and then tap the "Next" button. In this case, we're selecting the porch light we've got set up.

Next, select when you want your light(s) to automatically turn on and off. Here, we want the porch light to turn on when the sun sets and turn off when the sun rises, but you could also have your lights turn off at either midnight or 2:00 AM. Hit "Next" after making your selection.

You've now successfully configured Moonlight. Go ahead and officially enable it by tapping the "Turn It On Now" button.

Moonlight is now active. In the future, you can come back to this section in the app and make any changes, as well as temporarily disable the feature if you need to.