// GUIDE 11

Your first useful smart home automations

Smart Home Starter series · Part 3 of 5

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:

Automations are what turn a pile of gadgets into a smart home.

Rules before you start

Automation 1: Lights on at sunset

  1. Go to Settings, then Automations & scenes, then Create automation, then Create new automation.
  2. Trigger: add Sun, and choose Sunset. If you like, add an offset, such as 30 minutes before.
  3. Action: add Light: Turn on, and pick your lamp.
  4. 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.

  1. Trigger: State of your door sensor, changing to Open, for 10 minutes.
  2. 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.

  1. In Settings, then Automations & scenes, open Blueprints.
  2. Search for a low battery blueprint from the official or well-known sources, and import it.
  3. Set the level (20% is a good start) and the notification.

Automation 4: Turn things off when nobody's home

  1. In Settings, then People, make sure each person is linked to their phone, so HA knows when they're home.
  2. 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.
  3. 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 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

Quick checklist

Common beginner mistakes