For: anyone with Home Assistant running (see the Home Assistant guide). Time: 30 minutes. Difficulty: easy.
What is an automation?
A rule that says "when this happens, do that". Home Assistant calls the parts:
- Trigger: what starts it (sunset, a door opening, a time of day).
- Condition: an optional "only if" (only if I'm home, only after dark).
- Action: what it does (turn on a light, send a notification).
Automations are what turn a pile of gadgets into a smart home.
Rules before you start
- Start with useful, not clever. One tiny automation that works beats ten that don't.
- Keep a manual override. A light should still have a switch.
- Be careful with safety things. Don't automate door locks or heating safety limits until you're confident.
- Name things clearly. "Landing light" beats "Light 3".
Automation 1: Lights on at sunset
- Go to Settings, then Automations & scenes, then Create automation, then Create new automation.
- Trigger: add Sun, and choose Sunset. If you like, add an offset, such as 30 minutes before.
- Action: add Light: Turn on, and pick your lamp.
- Name it "Lamp on at sunset" and save.
To test, open the automation's menu and choose Run.
Automation 2: Tell me when a door has been left open
You'll need a door sensor and the Home Assistant app on your phone, signed in to your Home Assistant.
- Trigger: State of your door sensor, changing to Open, for 10 minutes.
- Action: Notifications: Send a notification via mobile_app to your phone, with the message "The back door has been open for 10 minutes."
Automation 3: Warn me before a battery dies
Battery-powered sensors die quietly. Home Assistant has ready-made rules, called blueprints, for this.
- In Settings, then Automations & scenes, open Blueprints.
- Search for a low battery blueprint from the official or well-known sources, and import it.
- Set the level (20% is a good start) and the notification.
Automation 4: Turn things off when nobody's home
- In Settings, then People, make sure each person is linked to their phone, so HA knows when they're home.
- Trigger: choose Entity: State, pick the Home zone, and set it to change to 0. Home Assistant counts how many people are in the Home zone, so 0 means everyone's out.
- Action: turn off the lights and any plugs you don't need.
Test it carefully. Don't leave a heater or a fridge on a plug that gets switched off.
When it doesn't work
Open the automation and look at Traces. It shows what triggered, which conditions passed, and where it stopped. That's the quickest way to find the problem.
Common culprits:
- The trigger device was called something different.
- A condition was never true.
- The phone app wasn't set up, so notifications go nowhere.
The skull-dog says: An automation does exactly what you tell it, even when that's a daft idea at 3am. Keep alerts calm, keep actions reversible, and don't let a rule do something you couldn't undo.
Ideas to try next
- Turn the hall light on when motion is detected after dark.
- Dim the lights in the evening.
- Get a message when the washing machine finishes, using a smart plug with power monitoring.
- Remind you to take the bins out.
Quick checklist
Common beginner mistakes
- Too many automations too soon. Start small.
- No way to stop one. Make sure you can disable it.
- Testing in the middle of the night. Test during the day, with the family warned.
- Skipping backups before big changes. Back up first (see the 3-2-1 rule).