Smart Home Assistant

Home Assistant Letterbox Notification (UK)

SepehrBy Sepehr· 17 November 2026· Updated 17 November 2026· 5 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Polished brass letterbox plate with a wide post slot set into a black painted front door

Key takeaways

  • A Zigbee contact sensor with its magnet on the letterbox flap is enough to trigger a Home Assistant letterbox notification in seconds.
  • Set a short for: value of two seconds on the state trigger so a rattled flap does not send a false alert.
  • Use mode: single with a one-minute delay so several leaflets in a row produce one notification, not five.
  • A post waiting helper lets the front door clear the alert and drives an optional 18:00 reminder.
  • If the flap rests slightly ajar the sensor stays on, so fit the foam spacer before blaming the automation.
On this page[tap to expand]

A Home Assistant letterbox notification tells your phone the moment something drops through the door, using a cheap Zigbee contact sensor on the flap. It takes about 20 minutes. The part that matters is the logic after the trigger: ignoring a stuck flap, grouping several items into one alert, and clearing the reminder once you collect the post.

Parcels that need a signature are a different job, so this guide covers letters and small packets only. If you want a plain "someone is at the door" alert instead, our best smart doorbell roundup is the better start.

What do you need before you start?

  • A contact sensor for the flap: any magnetic door/window sensor that Home Assistant can see will do. Zigbee models are small, run on a coin cell and report instantly. Our best smart door sensor guide compares the options.
  • A way to get it into Home Assistant: a Zigbee coordinator running ZHA or Zigbee2MQTT, or a Matter or Bluetooth sensor that is already paired. See the best Zigbee hub guide and the ZHA setup guide if you have not done this yet.
  • The Companion app: for phone notifications. The Home Assistant notifications guide covers setup.
  • Double-sided tape and five minutes: no drilling, and nothing that needs to go inside the door itself.
Diagram showing a contact sensor on a letterbox flap sending a Zigbee signal to Home Assistant, which sends a phone notification and later clears it
The whole flow: flap opens, Home Assistant waits a few seconds, sends one alert, then clears it when you collect the post.

Where should the sensor go on a letterbox?

Put the magnet on the inside of the flap and the sensor body on the door beside the opening, so the two separate when the flap lifts. Home Assistant reports a contact sensor as a binary_sensor, and with the opening device class "on" means open and "off" means closed (Home Assistant binary sensor docs).

Two fixes make this far more reliable. First, mount the sensor on the inside face, out of the rain and away from anyone fiddling with it. Second, if the flap is spring-loaded and bounces, add the foam spacer from the sensor's box so it closes cleanly. A flap that rests slightly ajar will leave the sensor permanently "open" and no automation can fix that.

If your letterbox has a draught-excluding brush or an internal cage, a small vibration sensor taped inside the cage is a sensible alternative. It reacts to the thud of post landing rather than the flap itself, though it can also trigger when the door is slammed.

Step 1: Name the sensor entity

Open Settings → Devices & services, find the sensor and rename its entity to something obvious such as binary_sensor.letterbox_flap. Set the Show as option to "Opening" if it came through as a generic sensor. Open and close the flap a couple of times and watch the state flip on the entity page. If nothing changes, move the magnet closer before going any further.

Step 2: Create a "post waiting" helper

Go to Settings → Devices & services → Helpers → Create helper → Toggle and call it "Post waiting". This creates input_boolean.post_waiting, a simple on/off switch Home Assistant remembers (Home Assistant input boolean docs). It lets the automation know whether you have already been told about unread post, which stops repeat alerts and lets you build a reminder later.

Step 3: Build the notification automation

The trigger is the flap changing to "on". The state trigger's for option holds the trigger back until the new state has lasted for the time you set, and if the state changes before then it does not fire (Home Assistant state trigger docs). A short for value therefore filters out a flap that is only brushed or rattled by wind, while still alerting within seconds of a real delivery.

alias: Letterbox - post arrived
mode: single
triggers:
  - trigger: state
    entity_id: binary_sensor.letterbox_flap
    to: "on"
    for:
      seconds: 2
conditions:
  - condition: time
    after: "06:00:00"
    before: "21:30:00"
actions:
  - action: input_boolean.turn_on
    target:
      entity_id: input_boolean.post_waiting
  - action: notify.mobile_app_your_phone
    data:
      title: "Post has arrived"
      message: "Something came through the letterbox."
      data:
        tag: letterbox-post
        group: letterbox
  - delay: "00:01:00"

Replace notify.mobile_app_your_phone with your own device's notify action. The tag value means any later notification with the same tag replaces the earlier one instead of stacking, and the same tag can be used to clear it (Home Assistant Companion notification docs).

The one-minute delay at the end is deliberate. With mode: single, extra triggers that arrive while the automation is still running are ignored, so a handful of leaflets pushed through one after another produces a single alert (Home Assistant automation modes). The time condition keeps it quiet overnight, which suits a flap that someone might push open at 2am.

Step 4: Clear the alert when you collect the post

A notification that never goes away is just noise. Add a second automation that turns the helper off and removes the phone alert when you open the front door, using whichever contact sensor or lock entity you already have on it. Our garage door left open guide shows a similar open/closed pattern you can borrow.

alias: Letterbox - post collected
triggers:
  - trigger: state
    entity_id: binary_sensor.front_door
    to: "on"
conditions:
  - condition: state
    entity_id: input_boolean.post_waiting
    state: "on"
actions:
  - action: input_boolean.turn_off
    target:
      entity_id: input_boolean.post_waiting
  - action: notify.mobile_app_your_phone
    data:
      message: clear_notification
      data:
        tag: letterbox-post

No door sensor? Add a button to your dashboard that turns the helper off, or use a notification action so you can tap "Collected" on the alert itself. One caveat: opening the front door to leave for work will also clear the alert, so if that matters to you, only run the clearing automation when you are at home.

Step 5: Test it properly

Open the flap and hold it for three seconds. You should receive one notification and see the helper turn on. Close it, open it again within the minute, and confirm nothing new arrives. Then open the front door and check the alert disappears and the helper switches off. Finally, open Settings → Automations, choose the automation and read its Traces tab, which shows exactly which condition stopped a run if it did not behave as expected.

Why am I not getting a notification?

The sensor never changes state: the magnet is too far away or on the wrong side. Reposition it so the two parts are almost touching when the flap is closed, and check the entity page rather than the automation first.

Alerts arrive overnight or not at all in the daytime: check the time condition. Times in the condition use your Home Assistant time zone, so confirm it under Settings → System → General.

Unavailable after a few weeks: usually a flat coin cell or a weak Zigbee link. Set up the low battery alerts so you hear about it before post goes unnoticed.

The flap stays "on": it is resting open. Fit the spacer, or move the sensor so the closed gap is fractionally tighter.

Can you remind yourself if post is left sitting there?

Yes. Because the helper stays on until you collect the post, a third automation can run at, say, 18:00 with a state condition on input_boolean.post_waiting and send a gentle reminder. This is the main reason to use a helper rather than a bare trigger. It also helps with households where someone else is home: one person collects the post and the alert disappears for everyone.

Buy the picks in this guide

Recommended for Home Automation

See all devices →

Frequently asked questions

Can Home Assistant tell me when the post arrives?
Yes. Home Assistant can tell you when the post arrives if you fit a contact sensor to the letterbox flap, or a vibration sensor inside a cage behind it. When the flap opens the sensor changes to on, and a state-trigger automation sends a Companion app notification to your phone. The most reliable set-up adds a short for: delay to ignore rattles, a one-minute single-run window so a bundle of letters gives one alert, and a helper that remembers unread post until you open the front door. The caveat is that a sensor only knows the flap moved, not what was delivered, so it cannot distinguish a parcel from a takeaway leaflet.
What is the best sensor for a letterbox?
A small magnetic contact sensor is the best sensor for most letterboxes because it reports the flap moving instantly, runs on a coin cell and costs little. Fit the magnet to the flap and the sensor body to the door frame so they separate when the flap lifts. Zigbee versions are typically most responsive in Home Assistant through ZHA or Zigbee2MQTT. A vibration sensor suits letterboxes with an internal cage or a wide brush flap, where a magnet will not line up. The caveat is signal strength: a metal door can weaken Zigbee, so check the entity updates reliably from the spot you choose before sticking it down for good.
Why does my letterbox sensor keep showing open?
A letterbox sensor that keeps showing open usually means the flap is resting slightly ajar, so the magnet never gets close enough to the sensor to register closed. Fitting the foam spacer from the sensor box, or moving the sensor so the closed gap is tighter, normally fixes it. Stiff or sprung brush flaps can also hold the flap up, in which case moving the magnet to a part of the flap that sits flush helps. Check the sensor entity on its own page before changing the automation. If the state is correct there but alerts still misbehave, open the automation trace to see which condition is blocking the run.

Sources

Sources verified 2026-11-17

  1. Home Assistant — Binary sensor integration (device classes)
  2. Home Assistant — State changed trigger
  3. Home Assistant — Input boolean integration
  4. Home Assistant — Automation modes
  5. Home Assistant Companion — Basic notifications
  6. Wikimedia Commons — Letterbox at Number10 Downing Street (Sergeant Tom Robinson RLC, MOD, OGL v1.0)
›How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Citing this page? Please use a dofollow link back to the original article — it helps us keep the data on this page accurate and up to date.

Related reading