← All posts

Home Assistant starter guide: automate three things this weekend

Most smart homes are a drawer of apps, one per brand, none of which talk to each other. Home Assistant is the free, open-source hub that pulls them into one place and runs your automations on a box in your own house. This guide gets it running in an afternoon and then builds three automations that are actually worth having: lights that come on before dusk, a nudge when a door is left open, and a sweep that turns things off when everyone has gone out.

Pick the box it runs on

Home Assistant needs to run all the time, so it wants its own small, always-on computer. The project's installation page lays out two sensible paths for a beginner, and recommends the same software for both: Home Assistant Operating System, which it calls "the recommended installation type"[1]. The alternatives, running it as a container or in a virtual machine, are for people already comfortable with those tools; the container version makes you manage updates yourself and can't run the add-on apps that Thread and Z-Wave support depend on[1].

Home Assistant GreenRaspberry Pi 4 or 5
What it isReady-made box with the OS preinstalledA Pi you already own (or buy), flashed yourself
Memory and storage4 GB RAM, 32 GB eMMC built in[3]At least 2 GB RAM; an A2-class microSD card of 32 GB or more[2]
Power drawAbout 1.7 W idle, 3 W under load[3]Depends on board and accessories
Price (as of October 2026)$199 / €179 recommended retail[3]What you've already paid, plus card and an official power supply
Setup effortPlug in power and Ethernet[1]About 15 minutes of flashing

My take: if a Pi 4 or 5 is sitting in a drawer, use it. If you'd be buying a Pi, case, supply and card anyway, the Green removes the two classic sources of trouble, cheap SD cards and underpowered chargers. Either way, plan on a wired Ethernet connection; the Pi instructions call it required for installation and "highly recommended" afterwards[2].

Install it in an afternoon

On a Green there is nothing to install: connect power and your network and it boots[1]. On a Raspberry Pi, the official steps are short[2]:

  1. Install Raspberry Pi Imager on your computer.
  2. Choose the OS under "Other specific-purpose OS", then "Home automation", then "Home Assistant", and pick the image for your board (Pi 4 or Pi 5).
  3. Select your microSD card, write the image, and eject it. Everything on the card is overwritten.
  4. Put the card in the Pi, plug in Ethernet on the same network as your computer, then connect power. Use a proper supply: the docs warn that phone chargers may not be suitable and that a computer's USB port must not be used.
  5. In a browser, open homeassistant.local:8123. On a Pi 4 or 5 the page should appear within a minute or so; if nothing shows after five minutes, the docs suggest the image probably didn't write properly and you should flash the card again.

The onboarding wizard then asks you to create the owner account, set your home location (sunset times are calculated from it) and lists devices it has already discovered on your network. As of October 2026 the current release is 2026.10, out since October 7[14]; updates arrive often, so get in the habit of skimming the release notes before you install one.

Before you add a single device, do one more thing: install the Home Assistant Companion app on your phone and sign in to your new server. It is what makes presence detection and phone notifications work, and the third automation below depends on it.

A little vocabulary, and the devices you'll need

Every Home Assistant automation has the same three parts. The docs define them as a trigger that starts it, an optional condition that must be true at that moment, and an action that does something[4]. Their own example is a good sentence to keep in your head: "when Paulus enters home" (trigger), "and it is after sunset" (condition), "turn on the lights in the living room" (action). One subtlety worth learning early: conditions are checked only at the moment the trigger fires. If Paulus gets home at 5 p.m. and the sun sets at 6, the lights don't come on at 6, because the trigger has already come and gone[4].

Everything you control shows up as an entity with an ID like light.porch. For the three projects below you need, at minimum:

The radio matters. Wi-Fi and Matter-over-Wi-Fi devices join your existing network directly. Zigbee devices, and Matter devices that run over Thread, need a radio Home Assistant can talk to; the Matter docs are explicit that a Thread device needs "a Thread border router near the device"[12]. The project's own USB adapter, the Connect ZBT-2, does Zigbee or Thread at a recommended price of $49 / €45 as of October 2026, but it "cannot do both Zigbee and Thread simultaneously", so pick the one your sensors use[10]. For a first sensor, Zigbee is the cheapest and most widely available option.

Two placement rules from the Zigbee integration's docs will save you an evening of debugging[11]. Put the adapter on a USB extension cable, away from the box itself, and plug it into a USB 2.0 port rather than USB 3, which the docs call a known source of interference. And add mains-powered devices like plugs and bulbs first, because they act as Zigbee routers that extend the network for the battery sensors you add afterwards. Don't then switch those bulbs off at the wall: routers that keep disappearing break the mesh.

Automation 1: lights on before it gets dark

The classic first automation: one device, and you see it work every day. Go to Settings, then Automations & scenes, and create a new automation. Add a Sun trigger, choose sunset, and set an offset so it fires a little before dark. Add an action to turn on your lamp. Here is the same thing in YAML, using the docs' own forty-five-minute offset[5]:

alias: "Porch light before sunset"
triggers:
  - trigger: sun
    event: sunset
    offset: "-00:45:00"
actions:
  - action: light.turn_on
    target:
      entity_id: light.porch

You never have to type YAML; the visual editor writes it for you, and you can flip between views to see how one maps to the other. A refinement once it works: trigger on the sun's elevation instead, with a numeric state trigger that fires when it drops below an angle such as -4 degrees[5]. Then add a Time trigger that turns the light off at 11 p.m.

Automation 2: tell me when the door's been left open

Back doors, garage doors, the freezer in the basement. Once your contact sensor is paired, add a State trigger on it, set "To" to open, and fill in "For": the door has to stay open that long before anything happens, so you don't get a ping every time someone walks through. The docs' own example is exactly this[6]:

alias: "Remind me when the back door stays open"
triggers:
  - trigger: state
    entity_id: binary_sensor.back_door
    to: "on"
    for: "00:05:00"
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      message: "The back door has been open for 5 minutes."

For a door sensor, "on" means open. The action sends a message to your phone: if the Companion app has registered your phone as a notify entity, the docs recommend exactly this "send a notification message" action with the phone as the target[8]. Older setups may instead show a phone-specific action named something like notify.mobile_app_your_phone; either works.

One limitation to know about: the five-minute wait does not survive a restart. The docs say the timer resets if Home Assistant restarts or automations are reloaded[6], so if you happen to update the system while the door is open, the clock starts over. For a reminder, that's fine. For anything safety-related, it is a reason not to rely on this alone.

Automation 3: turn things off when everyone's gone

This is where Home Assistant beats a single-brand app: it combines devices from different makers with information about people. When you installed the Companion app, it created a device tracker for your phone whose state is the name of the zone you're in, or not_home[9]. Assign that tracker to your person in Settings, then People, and do the same for everyone in the household.

The useful fact is that a zone's state is "the number of persons that are currently in a zone"[7]. So the home zone reads 2 when two of you are in, and 0 when the house is empty. A numeric state trigger on that number gives you a clean "last person left" event:

alias: "Everyone left: lights off"
triggers:
  - trigger: numeric_state
    entity_id: zone.home
    below: 1
    for: "00:10:00"
actions:
  - action: light.turn_off
    target:
      entity_id:
        - light.porch
        - light.living_room

The ten-minute "for" is there to absorb a phone that briefly reports the wrong location. Recent versions of the visual editor also offer a dedicated "zone occupancy cleared" trigger that does the same job in fewer clicks, and the zone docs use it in their example of turning off a fan when home is empty[7]. Start with lights. Once you trust it, add a smart plug on the space heater, or set the thermostat back.

Be realistic about phone presence. On iPhone, geofencing for your zones is reliable, but outside them location updates can be coarse and arrive only every couple of hours; on Android, background updates usually come every one to three minutes, and high-accuracy mode drains the battery noticeably[9]. Departure detection is generally good enough for "turn the lights off". It is not good enough for "unlock the front door when I arrive", and you should not build that.

Before you go further: backups, and when not to bother

Turn on automatic backups now, while the system is small. The backup settings let you choose a schedule and how many copies to keep, and backups are encrypted; you'll be asked to download an emergency kit containing the encryption key, without which you cannot restore[13]. Store that kit somewhere other than the Home Assistant box. The docs also recommend keeping a copy of backups "on another system (outside of Home Assistant) and ideally also one off-site", and list network storage, Google Drive and OneDrive as destinations[13]. That is the 3-2-1 rule applied to your house; if a microSD card dies, you'll be glad you did.

When Home Assistant is the wrong choice:

Sources

  1. Home Assistant — Installation, accessed October 2026
  2. Home Assistant — Raspberry Pi installation, accessed October 2026
  3. Home Assistant — Home Assistant Green, accessed October 2026
  4. Home Assistant — Automation basics, accessed October 2026
  5. Home Assistant — Automation triggers, accessed October 2026
  6. Home Assistant — State trigger, accessed October 2026
  7. Home Assistant — Zone integration, accessed October 2026
  8. Home Assistant — Notifications integration, accessed October 2026
  9. Home Assistant Companion docs — Location, accessed October 2026
  10. Home Assistant — Connect ZBT-2, accessed October 2026
  11. Home Assistant — Zigbee Home Automation (ZHA) integration, accessed October 2026
  12. Home Assistant — Matter integration, accessed October 2026
  13. Home Assistant — Common tasks: backups, accessed October 2026
  14. Home Assistant — Full changelog for 2026.10, accessed October 2026

Related: Weekend build: an ESP32 temperature and humidity monitor · Self-hosting 101 · The 3-2-1 backup rule in practice