Chapter 7
Your first routine that runs
The chapter in a minute
- A routine is three choices you make once: what starts it, what must be true and what it does.
- Where a hub has a test control, assume it really acts, and swap the action for a message when you want a dry run.
- Locks, alarms, medical equipment and anything someone's safety rests on stay out of your routines.
- Everyone in the home can stop it by hand, and at least one other person has done so.
Try it now
The evening lamp
0 of 14 steps done
Step 1 of 14
Write your when, only if, then sentence at the top of a page, then write the routine's row before you build it. Under 'may see', put the time of sunset and whether someone's home. Under 'may do', put 'switch the hall lamp on'.
Try this
Try this, from the book
Write your routine as one sentence, using three little words: when, only if, then. 'When it gets dark, only if someone's home, then the hall lamp comes on.' Now read it out to someone it affects and see what they say.
Tools and settings, as of a date
The book points to the ‘First routine’ section of the companion page. Here it is in full, with the date each detail was checked. Open it on the companion page
Chapter 7 points here. It promises today's wording for each path, the choices for the lamp's timing, and the 'If yours differs' note.
Today's wording for each path
| Home Assistant | Google Home app | Apple Home app | |
|---|---|---|---|
| Where | Settings, Automations and scenes, Create automation | Add, Automation | Add, Add Automation |
| What starts it | When | Starters | A trigger: an accessory, people arriving or leaving, or a time |
| What must be true | And if | Conditions (optional; Any or All) | Time-based automations can be limited to when someone is home |
| What it does | Then do | Actions | The scenes and accessories you select, then Next |
| Save | Save, with a plain name | Name it, then Save | Done |
| Turn it off and on | The menu, Disable | Active or Inactive | Automation tab, tap the automation, then turn Enable This Automation off or on |
| Who may build | Not stated on the pages read | Admins, or Members with the Settings permission | Not stated on the page read |
Google's editor covers household automations; personal routines are separate. Apple's routines need a home hub. Sources: Tutorial: Create your first automation (opens in a new tab); Automation editors (opens in a new tab); Manage smart home automations in Google Home (opens in a new tab); Create an automation (opens in a new tab); Create scenes and automations with the Home app (opens in a new tab) (published 15 September 2025; Apple's column re-read on 14 November 2026). Apple's page also says that to delete an automation, you tap it, scroll to the bottom and tap Delete Automation.
Amazon's Alexa app. Amazon's own routines help, read on 14 November 2026:
- Open the Alexa app and select More, then Routines.
- Select Plus.
- Select Add an event, and follow the steps to choose what starts it.
- Select Add an action, and follow the steps to choose what it does. Some actions show extra settings, such as conditions.
- Select Save.
The page doesn't say how to turn a routine off. Source: Create an Alexa Routine in the Alexa App (opens in a new tab) (no date on the page).
Choices for the lamp's timing
- Home Assistant: Sunset, Sunrise, Dusk and Dawn. Its page advises against adding an offset to twilight, because "the duration of twilight is different throughout the year" (Automation triggers (opens in a new tab)).
- Google Home: sunrise or sunset, with an offset if you want one (Supported automation starters, conditions and actions (opens in a new tab)).
- Apple Home: a time of day.
The dry run: the message in place of the lamp
- Home Assistant. Under Then do, choose Send a persistent notification to leave the message in the hub's own list of notices, going nowhere else. Or choose Send a notification message and pick a target. The older Send a notification action "might not send the message to the place you expect". Sources: Notifications (opens in a new tab); Send a notification message (opens in a new tab); Send a notification (opens in a new tab). Whether your phone appears as a target: the phone app's own page doesn't say it does. It describes a separate notification action for each phone, whose name begins mobile_app_ followed by the phone's name, and shows it only as written code, with no on-screen steps (the phone app's notifications page (opens in a new tab)). If your phone isn't offered as a target, keep the message on the hub. Checked on 14 November 2026.
- Google Home. "Send a notification" is an action; so is "Broadcast an announcement or a message". The page doesn't say who receives the notification, so check.
- Apple Home. No message action was found on the page read. Use the fallback in chapter 7.
The test buttons. Home Assistant's Run actions really does the thing; it skips what starts the routine and its conditions. You can test one condition on its own, which runs no actions (Testing automations (opens in a new tab)). Google Home describes no test control. Apple's Test This Automation is described as a preview; the page doesn't say whether the accessory operates.
If it doesn't run. Home Assistant: open the routine's trace (Troubleshooting automations (opens in a new tab)). Google Home: the Activity feed shows when it ran and what started it (Troubleshoot Google Home automations (opens in a new tab)).
If yours differs
The words on your screen may not match these. Look for the control that does the same kind of job: what starts it, what must be true, what it does. Google itself says its automations are "for convenience only, not safety or security-critical use cases", so nothing a person's safety depends on goes in a routine.
Checked on: 8 November 2026, and 14 November 2026 for Apple's column, Amazon's routines and the phone as a target.