Skip to content

How to turn your lights on at sunset automatically (Alexa, Google Home and Apple Home)

Set lamps and smart bulbs to switch on at sunset and off at bedtime in Alexa, Google Home or Apple Home, or with no speaker at all. Step by step, plus fixes.

By the Plugged-In Home editors · Updated

Researched, not lab-tested · We may earn a commission from links on this page. How we choose

Quick answer

Put your lamp on a smart plug or use a smart bulb, add it to your home app, then create a routine or automation that starts at sunset and turns the light on. Add a second one at bedtime to turn it off. It takes about five minutes in Alexa, Google Home or Apple Home. No smart speaker? The Kasa and WiZ apps can schedule sunset on their own.

Which one fits you
Key takeaways
  • Any smart plug or bulb works; Matter models work in every app.
  • Sunset follows your location, so it adjusts through the seasons.
  • Apple Home needs a HomePod or Apple TV to run automations.
  • Schedule each light in one app only, or schedules can undo each other.
  • Lights on at the wrong time? Check the location or address your app uses.

What you need

A smart plug for a lamp, or a smart bulb in a fixture. The Kasa KP125M and WiZ Full Color both work with every major app through Matter. Make sure your home app knows your location, since that’s how it knows when sunset is.

Apps rename their menus from time to time, so the exact labels below may differ slightly on your phone. The steps stay the same.

Plug, bulb or switch?

Pick by the light you want to automate:

  • Table and floor lamps: a smart plug. You keep the bulb you like, and one plug runs the whole lamp.
  • Ceiling fixtures, and lamps you want to dim or change color: a smart bulb. Leave the wall switch on, because a bulb with no power can’t hear the routine. WiZ also advises against putting its bulbs on a dimmer switch.
  • Fixtures with several bulbs on one switch: a smart light switch handles them all at once, but it’s a wiring job, so it’s for owners rather than renters.
  • Porch and string lights: an outdoor plug rated for the weather. See the best outdoor smart plugs.

In the Alexa app

Alexa calls these routines.

  1. 1Open the Alexa app and tap More, then Routines, then the plus sign.
  2. 2Choose ‘When this happens’, then Schedule, then Sunset.
  3. 3Add an action: Smart Home, pick your lamp, set it to On.
  4. 4Save. Repeat with a fixed time, like 11 pm, set to Off.

In Google Home

Google calls these automations.

  1. 1Open Google Home and go to Automations, then Add.
  2. 2Pick Household, then add a starter: Sunrise/sunset, then Sunset.
  3. 3Add an action: Adjust home devices, pick your lamp, turn On.
  4. 4Save, then create a second automation to turn it off at bedtime.

In Apple Home

Apple calls these automations, and they need a home hub (HomePod or Apple TV).

  1. 1Open Home, tap the plus sign, then Add Automation.
  2. 2Choose ‘A Time of Day Occurs’, then Sunset.
  3. 3Choose your lamp and set it to turn on.
  4. 4Tap Done, and add another automation to turn it off.

No smart speaker? Use the maker’s app

You don’t need Alexa, Google Home or Apple Home for this. The Kasa app, which runs the KP125M, can schedule a plug to turn on at sunset and off at sunrise or a set time (TP-Link). The WiZ app has its own schedules too, including sunset-to-sunrise lighting (WiZ). Kasa’s Away Mode is handy while you travel: it switches lights on and off at varying times so the house looks lived-in.

Schedule each light in one place only. If the Kasa app and an Alexa routine both control the same lamp at different times, they can undo each other, and the lamp seems to have a mind of its own.

Make it smarter

A few easy upgrades:

  • Add an offset, like 15 minutes before sunset, for darker rooms, if your app offers one.
  • Only run it when someone is home, using the app’s presence option.
  • Use warm white after dark if your bulbs support color temperature.
  • For hallways and bathrooms, a motion sensor such as the Aqara P2 turns lights on only when someone walks in.

If the light doesn’t come on

Most failures come down to one of these:

  • It came on at the wrong time. Sunset is worked out from the location your app has. In Alexa, check your Echo’s device location, especially after a move. In Google Home, check the home address in the app’s settings.
  • Nothing happened. Try the light from the app. If it shows as offline, it has dropped off Wi-Fi; our 2.4 GHz guide covers devices that keep dropping off.
  • A smart bulb didn’t respond. Check the wall switch: if someone turned it off, the bulb had no power.
  • Apple Home skipped it. Automations run on your HomePod or Apple TV, so check that it’s on and connected under Home Hubs & Bridges in the Home app’s settings.
  • It turned on, then off again. Another schedule is fighting it, often one set up earlier in the maker’s app. Delete one of them.

Where these facts come from

We haven’t walked through these apps ourselves. The steps follow Apple’s, Google’s, TP-Link’s and WiZ’s help pages and How-To Geek’s Alexa guide, checked on September 30, 2026. Apps change their menus often, so tell us through the contact page if a step has moved:

Side by side

Product
Kasa KP125M
WiZ A19
Our score9.2/108.4/10
Best forBest overall smart plugBest budget color bulb
Connects overWi-FiWi-Fi
Needs a border routerNoNo
PowerOutletLamp socket
Typical priceUsually under $50 for twoUsually under $25
Where to buyCheck price for Kasa Matter Smart Plug KP125M (2-pack) (opens in a new tab)Check price for WiZ Full Color A19 (Matter) (opens in a new tab)

Frequently asked questions

Will it still work if my phone is off?

Yes. Routines run from the cloud or your home hub, not your phone. Apple Home needs a HomePod or Apple TV at home.

Does it adjust for daylight saving time?

Yes. The app looks up sunset for your location each day, so the routine follows the seasons and the clock change without any changes from you.

Can I turn lights off at sunrise instead of a set time?

Yes. Alexa, Google Home and Apple Home all offer sunrise as well as sunset, so porch lights can run from dusk to dawn.

Filed under: Automations · Smart plugs · Smart lighting · Alexa · Google Home · Apple Home

Related