LocalNode
How it worksDemoAppsPricingFAQShop now
← All guides
Home/Community/Creating Basic Automations in Home Assistant

Creating Basic Automations in Home Assistant

Advanced
Beginner
5 min read
Published: May 7, 2026

Was this helpful?

Help us improve our community guides.

In this guide

  • Overview
  • The three parts of an Automation
  • Example: Porch lights at sunset
  • Using Blueprints for complex logic
  • Next Steps

Need direct help?

LocalNode Care Plan members get priority remote support.

Email Support →

More in Advanced

Adding External Storage to Your Localnode

Adding External Storage to Your Localnode — Step-by-step guide for your LocalNode.

5 min read

Adding Smart Home Devices to Home Assistant

Adding Smart Home Devices to Home Assistant — Step-by-step guide for your LocalNode.

5 min read

Backing Up Your Entire Localnode Configuration

Backing Up Your Entire Localnode Configuration — Step-by-step guide for your LocalNode.

5 min read
LocalNode

Plug-and-play home server. Your data, your hardware, your rules.

Product

How it worksDemoAppsCommunityPricingFAQ

Support

ContactShipping & ReturnsTrack Order

Legal

Privacy PolicyTerms of ServiceShipping Policy
© 2026 LocalNode. Built for people who value their privacy.Denton, TX · hello@localnode.tech

Controlling your lights from your phone is neat, but true smart homes run themselves. Home Assistant features a visual automation engine that lets you connect devices that normally wouldn't talk to each other.

Overview

Because Home Assistant runs locally on your LocalNode, automations execute instantly. When you walk past a motion sensor, the lights turn on in milliseconds, compared to the 2-3 second delay common with cloud-based platforms like Alexa or SmartThings.

The three parts of an Automation

Every automation in Home Assistant consists of three core building blocks:

  • Triggers (When): The event that starts the automation. (e.g., "When the motion sensor detects movement", or "At exactly 10:00 PM").
  • Conditions (And if): Rules that must be true for the automation to proceed. (e.g., "Only if nobody is home", or "Only if the sun has set").
  • Actions (Then do): What actually happens. (e.g., "Turn on the living room lights", or "Send a notification to my phone").

Example: Porch lights at sunset

Let's build a classic automation: turning the front porch lights on when it gets dark, and turning them off at 11:00 PM.

  1. Open Home Assistant and go to Settings > Automations & Scenes.
  2. Click + Create Automation in the bottom right, then select Create new automation.
  3. Add a Trigger: Click "Add trigger" > "Sun" > "Sunset". You can even add an offset, like "-00:15:00" to trigger 15 minutes before sunset.
  4. Add an Action: Click "Add action" > "Device". Select your Porch Light switch, and under Action, select "Turn on".
  5. Click Save, and name it "Turn on porch lights".

Now, create a second automation for turning them off:

  1. Click + Create Automation again.
  2. Add a Trigger: Click "Add trigger" > "Time". Enter "23:00:00" (11:00 PM).
  3. Add an Action: Click "Add action" > "Device". Select the Porch Light, and select "Turn off".
  4. Save it.
Home Assistant automation UI excerpt illustrating triggers and actions similar to a sunset lighting automation.
Source: Home Assistant documentation (CC BY-NC-SA 4.0).

💡 Tip: You can click the three dots in the top right of the automation editor and select "Show trace". This brings up a flowchart showing exactly how and when the automation last fired, which is invaluable for debugging why a light didn't turn on.

Using Blueprints for complex logic

Some automations are notoriously difficult to write from scratch, like "Turn on the bathroom light with motion, keep it on as long as there is motion, but turn it off 2 minutes after motion stops."

Home Assistant uses Blueprints to solve this. A Blueprint is a pre-written automation template shared by the community.

  1. Go to Settings > Automations & Scenes > Blueprints tab.
  2. Home Assistant comes with a "Motion-activated Light" blueprint by default. Click Create Automation next to it.
  3. Simply select your motion sensor from the first dropdown, and your light bulb from the second dropdown.
  4. Type "120" in the wait time box.
  5. Save it. You just configured a highly complex automation in three clicks.

Next Steps

  • Accessing Home Assistant from your phone away from home

Need help? Email hello@localnode.tech or visit localnode.tech/contact.