Home Assistant · Security · November 13, 2026

7 Home Assistant Security Automations Every Home Should Have

Cameras and sensors only make you safer if they do something. These seven automations turn Home Assistant from a dashboard you check into a system that watches out for you. Each one works with common gear: motion sensors, door contacts, smart lights, and cameras running Frigate or a similar integration.

1. Lights on when a person is detected at night

The most effective deterrent is simple: someone walks up after dark and the lights come on. Use person detection instead of plain motion so cats and headlights don't trigger it. Here's the full automation in YAML:

alias: Porch light on for person at night
triggers:
  - trigger: state
    entity_id: binary_sensor.front_door_person_occupancy
    to: "on"
conditions:
  - condition: sun
    after: sunset
    before: sunrise
actions:
  - action: light.turn_on
    target:
      entity_id: light.porch
  - delay: "00:05:00"
  - action: light.turn_off
    target:
      entity_id: light.porch
mode: restart

Replace the entity names with your own. The mode: restart line resets the five-minute timer if the person is still there.

2. Away mode that arms itself

Use your family's phones as presence sensors. When everyone leaves, Home Assistant switches to away mode: camera alerts go to your phone, interior motion becomes suspicious, and lights follow a lived-in schedule. When the first person comes home, it all switches back. No keypad, nothing to forget.

3. Door or garage left open

If a door contact or garage sensor stays open for 10 minutes, send a phone alert. At night, make it louder: flash a light or announce it on a speaker. A forgotten garage door is one of the most common ways homes get burglarized.

4. Package delivered alert

With a doorbell camera and object detection, you can get a snapshot when a package appears on the porch, plus a second alert if it disappears while you're away. That helps you get to deliveries before porch pirates do.

Skip the YAML for the core ones The Home Assistant Blueprint Pack has ready-to-import versions of the door-left-open alert, the water leak shutoff, auto-lock when everyone leaves and camera person alerts, plus four more everyday automations. Pick your cameras, lights and sensors from dropdowns and they're running in minutes.
Get the Blueprint Pack

5. Night mode for interior sensors

When you go to bed, motion in rooms nobody should be in, like a basement or a back room, sends an alert. Combine it with a "goodnight" button or a bedtime schedule so it arms without thinking.

6. Water leak shutoff

Not every threat is a person. A leak sensor under a water heater or washing machine can alert you instantly. Paired with a smart water valve, Home Assistant can shut off the main before a small leak becomes a big insurance claim.

7. Camera offline alert

A security system you think is working but isn't is worse than none. Have Home Assistant alert you when any camera or sensor goes unavailable for more than 15 minutes. You'll catch dead batteries, tripped breakers, and unplugged equipment before you need the footage.

Where to start

If you only set up two, start with #1 and #3. They prevent the most problems for the least effort. Then add away mode once you trust your presence detection.

Not sure your devices will work with Home Assistant? Check them with our free compatibility checker before you buy anything new.

Free: The Home Assistant Security Checklist 26 checks that turn cameras and sensors into a system you can trust. Print it and work through it in one evening.
No spam. Unsubscribe anytime.
Starting from scratch? The Smart Home Starter Kit shows you exactly what to buy and how to set it up, in the right order, so your first automations work the first time.
See the Starter Kit

Related: 8 Home Assistant Automations Every Home Should Have

← Back to all posts