How to Create a Smart Home Goodnight Routine That Automates Everything
How to Build a ‘Goodnight’ Automation Routine That Does Everything for You
Imagine saying “Goodnight” to your home and having it take care of everything. Lights off. Doors locked. Thermostat turned down. Security system armed. Blinds closed. All of it, at once, without you getting up.
That’s exactly what a smart home goodnight routine can do — and setting
one up is easier than most people think.
In this guide, you’ll learn how to build a bedtime automation for smart locks, lights and thermostat setup that works with Alexa, Google Home, or Apple HomeKit. Whether you’re a beginner or you already have a few smart devices, this step-by-step walkthrough will have your home saying goodnight right along with you.
You can build a basic goodnight routine in under 10 minutes using just an Amazon Echo and one smart plug. Start small and build from there.
What Is a Smart Home Goodnight Routine?
A goodnight routine is a single automation that triggers a sequence of actions across multiple devices when you’re ready for bed. Instead of walking around the house checking locks, switching off lamps, adjusting the heating, and arming sensors one by one, everything happens the moment you give the command or at a scheduled time.
Think of it as a ‘closing routine’ for your home — the same way a business locks up at the end of the day, your home tidies itself up each night.
A well-built goodnight automation typically handles:
• Turning off all lights or dimming them to zero gradually
• Locking all smart door locks
• Arming your smart home security or alarm system
• Setting the thermostat to your preferred sleeping temperature
• Closing motorised blinds or curtains
• Turning off the TV and any entertainment devices left on
• Starting a white noise machine or sleep playlist
• Activating a Do Not Disturb mode on connected displays
What Devices Do You Need for a Goodnight Automation?
You don’t need to own every device on this list. Even with two or three, you can build a meaningful goodnight routine. Here’s what each device brings to the table:
Smart Lights or Smart Plugs
Smart bulbs or smart plugs connected to lamps can be grouped and turned
off together in one action. If you have a mix of smart and regular bulbs, smart plugs can control entire lamps without replacing every bulb. Brands to look at: Philips Hue, LIFX, Govee, or any Alexa-compatible bulb.
Smart Door Locks
A smart lock is one of the most satisfying additions to a goodnight routine. Never wonder again if you locked the front door — your routine does it automatically. Top options in 2026: Schlage Encode Plus (Matter-compatible), Yale Assure Lock 2, and the August Wi-Fi Smart Lock.
Smart Thermostat
A smart thermostat included in your goodnight routine can drop the temperature to your ideal sleeping range automatically. Most sleep experts
Honeywell T9 all work well in automation routines.
Smart Speaker or Display
point. Say “Alexa, goodnight” or “Hey Google, goodnight” and the whole routine fires off. The speaker can also read you a sleep timer, play calming sounds, or give you a quick weather forecast for tomorrow morning.
Step-by-Step: How to Set Up Your Smart Home Goodnight Routine
Here’s how to build your goodnight routine from scratch. This works across
Alexa, Google Home, and Apple HomeKit.
Step 1: Decide What You Want Your Routine to Do
Before opening any app, write a simple list of what you want to happen at bedtime. Be specific: “turn off all lights,” “lock front door,” “set thermostat to 18°C.” Starting with a clear picture saves a lot of back and-forth in the app later.
Step 2: Open Your Smart Home App and Go to Routines
Open your Alexa app, Google Home app, or Apple Home app. Navigate to the Routines section (in Alexa and Google) or Automations (in Apple Home).
Tap “Create Routine” or the + button to start a new one. Step 3: Set Your Trigger
Choose how your goodnight routine starts. You have two main options: a voice command (say “Goodnight”) or a scheduled time (e.g. 10:30 PM every
night). For most people, a voice command is more flexible since bedtime varies. You can also set both — a scheduled fallback for nights you forget to say it.
Step 4: Add Your Actions in Sequence
Add each device action one by one. A good order to follow: start with lights
dimming slowly, then turn off all plugs and entertainment, then lock doors, then set the thermostat, and finish with any sleep sounds or notifications.
Most apps let you add a small delay between actions if needed.
Step 5: Add a Confirmation Message (Optional but Satisfying)
In Alexa and Google Home, you can add a voice response at the end of the routine. Something like “Goodnight. Everything is locked and your home is ready for bed” gives you peace of mind every singlenight. It’s a small touch that makes a big difference.
Step 6: Test the Routine and Tweak
Run the routine manually the first night. Watch each action fire in sequence
and adjust any timing or ordering that feels off. After a few nights you’ll
know exactly what you want to add, remove, or rearrange.
Goodnight Routine Setup by Platform
Each platform handles goodnight routines slightly differently. Here’s a quick breakdown:
Alexa Goodnight Routine Setup
1. Open the Alexa app → tap ‘More’ → ‘Routines’ → tap the + icon
2. Set the trigger to “Voice” and type “Goodnight”
3. Add actions: Smart Home → Control Device (repeat for each device) 4. Add a “Alexa Says” action at the end for a goodnight confirmation
5. Tap Save and test with “Alexa, goodnight”
Google Home Goodnight Routine Setup
6. Open Google Home app → tap ‘Automations’ → tap + to create
7. Choose ‘Voice command’ as the starter and type “Goodnight”
8. Add device actions for each smart device in your home
9. Add a ‘Google Assistant says’ response for confirmation
10. Save and test with “Hey Google, goodnight”
Apple HomeKit Goodnight Automation Setup
11. Open the Home app → tap the + icon → ‘Add Automation’
12. Choose ‘A Time of Day Occurs’ or use a Shortcut for voice
trigger
13. Select all devices you want to control and set their states
14. Use the Shortcuts app to create a “Goodnight” Siri shortcut that
triggers the scene
15. Test by saying “Hey Siri, goodnight”
Home Assistant Goodnight Automation YAML (Advanced)
If you run Home Assistant, you can build a far more powerful goodnight automation using YAML. This gives you complete control over every device, with conditions, delays, and even checks like “only lock the door if it’s currently unlocked.”
Home Assistant Tip: In Home Assistant, you can add a condition to your goodnight automation that checks if anyone is still awake based on motion sensors. If
someone is still moving around, the routine can wait or skip certain actions like turning off the living room lights.
A basic Home Assistant goodnight automation fires these actions in sequence: turn off all light groups, lock all door locks, set the climate entity to sleep mode, trigger a ‘Goodnight’ scene, and send a mobile notification confirming everything is done. The YAML structure uses alias, trigger (time or voice), and a sequence of service calls under action.
Once your basic routine is running smoothly, these upgrades take it to the
next level:
Gradual Dimming Scene: Instead of lights cutting off instantly, program them to dim slowly over 10 minutes. It signals to your body that it’s time to sleep without an abrupt change.
Phone Charging Reminder: Use a smart plug on your bedside lamp as a signal: when the lamp turns off, your phone notification reminds you to plug in your charger.
Guest Mode: Create a separate ‘Goodnight - Guest’ routine that skips locking the guest room door and keeps a hallway nightlight on. Activate it manually on nights you have visitors.
Morning Pre-Load: At the end of your goodnight routine, trigger the first step of your morning automation — like pre scheduling the coffee maker — so everything is ready before you even wake up.
Sleep Tracking Integration: Apps like Sleep as Android and Oura Ring can trigger Home Assistant automations. When your tracker detects you’ve fallen asleep, it can turn off any remaining lights or adjust the thermostat further.
Common Questions About Bedtime Home Automation
What if someone else in the house isn’t ready for bed?
Most platforms let you set exceptions or use presence detection. In Alexa, you can add a condition that skips turning off certain lights if a specific Echo device is actively playing. In Home Assistant, you can check if motion was detected in a room in the last 15 minutes before switching off those lights.
Can I trigger a goodnight routine without speaking?
Yes. A physical smart button like an Ikea Tradfri button or a Flic button placed on your bedside table can trigger the entire routine with one tap. No voice needed, no phone needed.
Does my internet need to be on for the routine to work?
It depends on your devices. Matter and Z-Wave devices support local control, so they keep working even without internet. Many Wi-Fi devices require a cloud connection, so it’s worth checking your specific devices.
Can the goodnight routine arm my security system too?
Yes, if your security system is smart-home compatible. Ring Alarm, SimpliSafe, and Abode all integrate with Alexa and Google Home. You can include an ‘arm in Stay mode’ action as part of your goodnight sequence.
A goodnight routine works best as part of a full day of automations. Pair it with these guides:
A bedtime automation smart locks lights thermostat setup is one of the most
satisfying things you can build in a smart home. It’s not just about convenience — it’s about the genuine peace of mind that comes from knowing everything is handled before you close your eyes.
Start with the basics: one voice command, three or four actions. Within a week you’ll wonder how you ever went to bed without it. Then keep adding. The more your home does for you at night, the more energy you have for the morning.