Skip to content
Back to blog
Home AssistantAutomationHomelab

Five Home Assistant automations I use every day

Home automation without useless gadgets: the automations I've kept running for months and that genuinely took work off my hands.

Ismael Catala3 min read

Home automation has an expectations problem. It's sold with videos of houses that run themselves and it ends in a drawer full of smart plugs nobody uses. After a couple of years tinkering, these are the five automations still alive in my setup.

1. The office light follows my working day

No expensive presence sensors. Home Assistant knows my computer is on because it answers a ping:

automation:
  - alias: "Office: light on when I start working"
    triggers:
      - trigger: state
        entity_id: device_tracker.office_mac
        to: "home"
    conditions:
      - condition: sun
        after: sunset
    actions:
      - action: light.turn_on
        target:
          entity_id: light.office
        data:
          brightness_pct: 70
          kelvin: 4000

The sun condition is what makes the difference. Without it, the light came on at eleven in the morning on a sunny day and I ended up disabling the whole automation.

2. Alert when the homelab runs out of disk

This one has saved me twice:

automation:
  - alias: "Homelab: disk at 85%"
    triggers:
      - trigger: numeric_state
        entity_id: sensor.proxmox_disk_used_percent
        above: 85
        for: "00:10:00"
    actions:
      - action: notify.mobile_app_phone
        data:
          title: "Homelab nearly full"
          message: "Disk at {{ states('sensor.proxmox_disk_used_percent') }}%"

The for: "00:10:00" matters: without it, any spike during a backup sends you a notification at three in the morning.

3. Power cut: graceful shutdown

If the UPS switches to battery, I don't want the server to hang on until it drops dead:

automation:
  - alias: "UPS: graceful shutdown"
    triggers:
      - trigger: numeric_state
        entity_id: sensor.ups_battery
        below: 40
    actions:
      - action: shell_command.shutdown_proxmox
      - action: notify.mobile_app_phone
        data:
          message: "Power cut. Shutting the homelab down."

A clean shutdown avoids filesystem corruption that would otherwise cost you an afternoon of recovery.

4. Movie mode without a remote

When the media player starts playing something, the room sets itself up: lights at 15% in a warm tone and the blind down. I built it because I got tired of standing up every time. It's the silliest automation on this list and the one that makes me happiest.

5. Bin reminder from a calendar

Home Assistant reads a shared calendar and only reminds me at nine in the evening when it's actually due. It's ridiculous how useful it is.

What I learned along the way

Start from the problem, not the device. Every gadget I bought before knowing what I wanted it for ended up in a drawer. The five above were all born from a "ugh, do I have to do this again".

If an automation needs explaining, it's badly built. When someone else lives in the house, any behaviour that isn't obvious reads as a bug, not a convenience.

Keep it local. None of these automations depend on a manufacturer's cloud. The day the company shuts the service down — and they always do — they'll keep working exactly the same.