Table of Contents

  1. How Automations Work
  2. 1. Lights On at Sunset
  3. 2. Turn Off All Lights When You Leave
  4. 3. Motion-Activated Hallway Light
  5. 4. Good Morning Routine
  6. 5. Notify When Door Left Open
  7. 6. Low Battery Alert
  8. 7. Thermostat Away Mode
  9. 8. Night Mode at Bedtime
  10. 9. Rain Notification
  11. 10. Laundry Done Notification
  12. Tips for Better Automations

How Automations Work

Every Home Assistant automation has three parts: a trigger (what starts it), optional conditions (constraints that must be met), and actions (what happens). The trigger fires when something changes in your home — time of day, a sensor reading, a device state change, a person arriving or leaving. Conditions gate the automation: the lights should only turn on if someone is home. Actions are what HA does: turn on a light, send a notification, call a script.

Creating automations in HA is done in Settings → Automations & Scenes → Automations → Create Automation. The visual editor walks you through triggers, conditions, and actions without needing to write YAML. That said, clicking "Edit in YAML" reveals the underlying code, which is handy for copying configurations from the community.

1. Lights On at Sunset

This is the automation that hooks every new HA user. Instead of setting a fixed time, HA can trigger exactly at sunset based on your home's coordinates — which changes every day throughout the year.

Trigger: Sun → Goes below horizon (sunset)

Action: Turn on [your lights]

You can add an offset (e.g., 30 minutes before sunset) if you prefer your lights on slightly earlier. You can also add a condition for "sun elevation is below -5 degrees" to handle cloudy days where it gets dark earlier. This single automation replaces dozens of seasonal schedule adjustments and "oops, it got dark and the lights weren't on" moments.

2. Turn Off All Lights When You Leave

How often have you left home and wondered if you left a light on? This automation eliminates that anxiety entirely.

Trigger: Zone → [Your Name] leaves [Home zone]

Condition: No other people home (use a "Person" state check — if everyone's devices are away)

Action: Call service → light.turn_off → all lights group

The key condition here is checking that you're the last person to leave. Without it, the lights turn off every time anyone steps out, which isn't what you want when your partner is still home. Set up device trackers for each household member and condition on all of them being away.

3. Motion-Activated Hallway Light

Motion-activated lights are the quintessential smart home convenience — lights that turn on when you need them and off when you don't, without ever touching a switch.

Trigger: Motion sensor → Motion detected (state changes to "on")

Condition: Time is between 10 PM and 7 AM (only auto-activate at night)

Action 1: Turn on hallway light

Action 2: Wait 2 minutes

Action 3: Turn off hallway light (if motion no longer detected)

Add a condition that the sun is below the horizon if you only want this active when it's dark. For the auto-off, consider using HA's "Wait for trigger" action which waits for the motion sensor to clear before starting the timeout — this prevents the light from turning off while someone is still in the hallway.

4. Good Morning Routine

A good morning routine automation can gradually wake you up and have your home ready before you even get out of bed.

Trigger: Time → 7:00 AM (weekdays only — use a condition checking {{ now().weekday() < 5 }})

Actions (in sequence):

The gradual light increase mimics a sunrise and is genuinely easier to wake up to than an abrupt alarm. If you use a smart alarm clock or a sleep tracker, you can even trigger this when you first move in the morning rather than at a fixed time.

5. Notify When Door Left Open

A door contact sensor combined with HA automations gives you a simple but incredibly useful alert: get notified if a door is left open for too long.

Trigger: Door sensor → state changes to "open"

Action 1: Wait 10 minutes (using the "Wait for trigger" action with a timeout)

Condition: Door sensor is still "open" (check state hasn't changed during the wait)

Action 2: Send notification "The [front door / garage door] has been open for 10 minutes!"

This is particularly useful for garage doors, which people frequently forget to close. You can escalate the notification cadence — notify after 10 minutes, notify again after 20 minutes, etc. — by using a repeat action or triggering a script that loops.

6. Low Battery Alert

With dozens of Zigbee sensors, door contacts, and remotes, it's easy to miss when device batteries die. This automation monitors all battery-reporting devices and alerts you when any drops below a threshold.

Trigger: State → any entity with "battery" in its name → changes

Condition: Triggering entity's state is below 20 (battery percentage)

Action: Send notification "{{ trigger.to_state.name }} battery is at {{ trigger.to_state.state }}%. Time to replace!"

The template in the notification uses the actual entity name and value, making the alert immediately actionable. This single automation replaces manually checking every device battery, which nobody actually does.

7. Thermostat Away Mode

Automatically switch your thermostat to an eco/away mode when nobody's home to save energy without any manual effort.

Trigger: All persons → state changes to "not_home"

Condition: Time is between 8 AM and 10 PM (don't mess with overnight temps)

Action 1: Set thermostat to eco mode (or a specific away temperature)

For the return trip, create a companion automation:

Trigger: First person → arrives home (state changes to "home")

Action: Set thermostat back to comfort temperature

If you set a reasonable eco temperature (say, 17°C in winter), this automation can meaningfully reduce your heating bills — your home isn't heating an empty house all day.

8. Night Mode at Bedtime

A bedtime automation that sets your whole home to "night mode" — dim lights, lock the doors, set the thermostat — with a single trigger.

Trigger: Time → 11:00 PM (or a button press, or a voice command)

Actions:

Consider making this automation available as a dashboard button labeled "Good Night" rather than purely time-triggered, so you can activate it whenever you actually go to bed rather than at a fixed time. You can use both: time-trigger as a fallback if you forget to tap the button.

9. Rain Notification

This requires a weather integration (most people use Met.no or OpenWeatherMap). Alert yourself when rain is forecast so you remember to close windows or bring in outdoor furniture.

Trigger: Weather entity → condition changes to "rainy" (or use a sensor for precipitation forecast)

Condition: Time is between 7 AM and 9 PM (no 3 AM rain alerts)

Action: Send notification "Rain is on the way! Remember to close the windows 🌧️"

For a more sophisticated version, use a weather forecast sensor that gives you precipitation probability over the next few hours. Trigger when probability exceeds 70% and you haven't had a notification in the last 6 hours (prevent notification spam on rainy days).

10. Laundry Done Notification

This is a fan favourite in the HA community. A smart plug with energy monitoring on your washing machine tells you exactly when the cycle is done — no more wet laundry left sitting in the drum.

Trigger: Smart plug power sensor → drops below 5W (washing machine has finished)

Condition: Power was above 10W within the last 30 minutes (machine was actually running, not just in standby)

Action: Send notification "Washing machine is done! Time to hang the laundry 🧺"

The condition is important — washing machines draw very little power in standby, and you don't want notifications every time you walk past the machine. The condition checks that the machine was actually running recently before alerting. The same approach works for dishwashers and dryers.

Tips for Better Automations

Where to Go From Here

These 10 automations cover the most impactful things beginners can do with Home Assistant. Once you're comfortable with triggers, conditions, and actions, explore templates (for dynamic content in notifications), custom scripts (for complex multi-step sequences), and the HA community forums where thousands of users share their configurations. The rabbit hole goes deep — and it's a very enjoyable one.

SmartWired participates in the Amazon Associates Programme. We may earn a commission from qualifying purchases at no extra cost to you.