Smart Home Assistant

Home Assistant Presence Simulation for Holidays (UK Guide)

SepehrBy Sepehr· 22 October 2026· Updated 22 October 2026· 7 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Large stone house at dusk with several warm lit windows glowing against a darkening sky

Key takeaways

  • Home Assistant presence simulation needs one Holiday mode toggle plus automations that switch lamps on and off after random delays.
  • The sun trigger accepts a negative offset such as -00:45:00, so a lamp can switch on 45 minutes before sunset.
  • A state trigger on zone.home reaching 0 for 24 hours can switch holiday mode on automatically when everyone has left.
  • The community Presence Simulation HACS integration replays lighting history from earlier days, and needs recorder retention longer than its delta (10 days by default).
  • UK councils advise combining timed lights with open daytime curtains, cancelled deliveries and no public posting of holiday dates.
On this page[tap to expand]

Home Assistant presence simulation makes an empty house look lived in by switching lamps on and off at slightly different times each evening while you are away. A holiday-mode toggle, two automations and one or two smart bulbs are enough, and it takes about 30 minutes to build.

Police forces and councils across the UK suggest timers and smart bulbs as one of several ways to make a home look occupied, but a fixed timer is predictable: the same lamp, the same minute, every night. This guide adds randomness and a single master switch. If you are new to the editor, start with our Home Assistant automations guide.

What do you need before you start?

  • Two or three lights Home Assistant can control. Smart bulbs or plug-in lamps on smart plugs both work. Pick lamps that can be seen from the street, such as the living room and a bedroom. Our best smart bulbs for the UK roundup covers options if you are buying.
  • A toggle helper. Home Assistant's input_boolean stores an on or off state you set yourself. You create it in Settings > Devices & services > Helpers > Create helper > Toggle. The Home Assistant helpers guide explains the other helper types.
  • A phone running the Home Assistant app with location tracking, if you want holiday mode to switch on by itself. See Home Assistant presence detection for setup.
  • Entity IDs for your lights. Find them under Settings > Devices & services > Entities. The examples below use light.living_room_lamp and light.bedroom_lamp; swap in your own.

Step 1: Create the holiday mode toggle

Create a Toggle helper named Holiday mode. Home Assistant gives it the entity ID input_boolean.holiday_mode. In the helper's More options you can choose its startup state; the default restores whatever it was before a restart, which is what you want so a reboot mid-holiday does not silently end the simulation.

Every automation below checks this one switch. Turning it on starts the routine, turning it off stops it, and you can flip it from the dashboard or the phone app from anywhere.

Step 2: Turn the living room lamp on around sunset, at a random time

Create a new automation, switch to YAML mode and paste this. It triggers 45 minutes before sunset, then waits a random 0 to 30 minutes before switching the lamp on, so the time drifts every evening.

alias: "Holiday mode - evening lamp on"
mode: single
triggers:
  - trigger: sun
    event: sunset
    offset: "-00:45:00"
conditions:
  - condition: state
    entity_id: input_boolean.holiday_mode
    state: "on"
actions:
  - delay:
      seconds: "{{ (range(0, 30) | random) * 60 }}"
  - action: light.turn_on
    target:
      entity_id: light.living_room_lamp
    data:
      brightness_pct: 70
      kelvin: 2700

Home Assistant's sun trigger takes an offset in seconds or hh:mm:ss, where a negative value fires before the event. The delay field accepts a template, so the random number is worked out fresh on every run. On a UK winter evening sunset can be before 4pm, so the lamp may come on while it is still light outside; if that bothers you, add a sun condition for after: sunset with a negative offset, or trigger on a fixed time instead.

Step 3: Turn the lamps off at a random time late in the evening

A lamp that always goes off at exactly 22:30 is as obvious as a plain timer. This second automation starts at 22:15 and waits up to 75 minutes before switching off the living room lamp, then does the bedroom lamp on its own separate delay.

alias: "Holiday mode - evening lights off"
mode: single
triggers:
  - trigger: time
    at: "22:15:00"
conditions:
  - condition: state
    entity_id: input_boolean.holiday_mode
    state: "on"
actions:
  - delay:
      seconds: "{{ (range(0, 75) | random) * 60 }}"
  - action: light.turn_off
    target:
      entity_id: light.living_room_lamp
  - delay:
      seconds: "{{ (range(5, 40) | random) * 60 }}"
  - action: light.turn_off
    target:
      entity_id: light.bedroom_lamp

The Home Assistant docs describe four automation modes: single (the default) ignores a new start while a run is active, restart stops the current run and begins again, queued lines runs up, and parallel starts each one immediately. single is right here, because you never want two overlapping runs fighting over the same lamp.

Step 4: Add a second lamp and a bedroom routine

One lamp that switches on and off is better than nothing, but a convincing pattern moves around the house. Copy the evening-on automation and change three things: the entity to light.bedroom_lamp, the trigger to a time such as "21:00:00", and the delay range to something different, such as 0 to 20 minutes. Now the living room lights first, the bedroom follows an hour or so later, and the order they switch off in differs too.

For a hallway or landing, a dim level of 20 to 30 per cent for the last half hour reads as someone heading to bed. If you already have a motion-triggered night light, our motion-activated night light guide shows the same dimming approach; just make sure holiday mode does not leave that automation reacting to a cat.

Step 5: Switch holiday mode on automatically when everyone has left

You can flip the toggle by hand, but forgetting is the usual failure. Home Assistant exposes a zone.home entity whose state is the number of people currently in the home zone. When it has read 0 for 24 hours, nobody has been home for a day, which is a reasonable signal that you are away rather than just out.

alias: "Holiday mode - switch on when away 24 hours"
mode: single
triggers:
  - trigger: state
    entity_id: zone.home
    to: "0"
    for: "24:00:00"
actions:
  - action: input_boolean.turn_on
    target:
      entity_id: input_boolean.holiday_mode
  - action: notify.mobile_app_your_phone
    data:
      message: "Holiday mode is on. Lights will mimic someone being home."

Pair it with a second automation that turns input_boolean.holiday_mode off when zone.home goes above zero, so the simulation stops as soon as the first person gets back. The notify action name depends on your device; the Home Assistant notifications guide shows how to find it.

Step 6: Test it before you leave

Turn Holiday mode on, then open each automation and choose Run actions from the three-dot menu, which skips the trigger and runs the steps. Check the lamps respond and the delay does not stall. Then open Settings > Automations & scenes, pick an automation and view its traces to confirm each ran through the condition and the random delay.

Do a full dress rehearsal the evening before you go: switch holiday mode on while you are home and watch the street-facing windows from outside. A lamp that is hidden behind curtains or only visible from the back of the house is not helping.

Is there a ready-made presence simulation add-on?

Yes: a community HACS integration called Presence Simulation replays your own history instead. It reads the Home Assistant recorder for the states of lights and other entities from a set number of days earlier (the delta) and applies them again, with an optional random offset of a few seconds on each switch time. It supports lights, covers, media players and anything controllable on or off, adds a switch entity you toggle to start and stop it, and its README notes you need the recorder to retain more days of data than your delta, with 10 days the default.

ApproachSetup effortHow realisticMain weakness
Fixed timer on a smart plugMinutesLow: same time every nightPredictable to anyone watching
Randomised automations (this guide)About 30 minutesMedium to high: shifting times, several roomsYou design the pattern by hand
Presence Simulation (HACS)About 15 minutesHigh: copies your own routineNeeds recorder history; lights lose brightness and colour replay without a companion component

The hand-built route is easier to understand and debug, and it does not depend on a third-party component surviving a Home Assistant update. The history replay is more lifelike if you have a settled routine and recorder data to copy. Note that the README does not state a support policy, so treat it as a community project.

What else makes an empty house look occupied?

Lights are only part of it. Havering Council's crime prevention advice warns against leaving daytime curtains closed, since that signals an empty home, and suggests cancelling milk and online deliveries. It also warns that a timed light paired with a table lamp visible through a window can be a giveaway. Several forces, including Hertfordshire, advise against posting holiday dates on social media.

Smart home gear can cover some of these: a smart blind or curtain motor can open in the morning, and a camera or doorbell can alert you to visitors. If you want to go further, our home security guide and best home security systems roundup cover alarms and cameras.

Why isn't my holiday mode automation running?

The lamp never switches on: check that input_boolean.holiday_mode is actually on when the trigger fires. The condition silently stops the run otherwise, and the trace will show it stopped at the condition.

The automation fires but the delay never ends: a restart or reload cancels a running delay. If you reload automations during the evening, the pending off step is lost. Reload before the trigger time, or use a final "all off" automation at 01:00 as a safety net.

The template errors out: the delay value must evaluate to a number. Keep the template in quotes and test it in Developer tools > Template before saving.

Holiday mode switches on while you are home: zone.home depends on phone location reporting. If the app's location permission is restricted, the state can read 0 even though you are in. Check the companion app's location setting and make sure at least one reliable tracker is configured.

The lamp stays on all night after a power cut: a smart plug may come back on at power restore. Set the plug's power-on behaviour to off in its own settings where the device offers it.

Buy the picks in this guide

Recommended for Smart Lighting

See all devices →
Shop these picks on our Amazon storefront →

Frequently asked questions

How do I make Home Assistant simulate presence while I'm on holiday?
Create a Toggle helper called Holiday mode, then build two automations that check it: one that switches a lamp on shortly before sunset after a random delay, and one that switches it off late in the evening after another random delay. Randomising the delay with a template means the times change every night, which is what makes the pattern harder to read from outside. Add a second lamp on different timings to move activity around the house. You can also install the community Presence Simulation integration through HACS, which replays your own lighting history from earlier days. The simple randomised approach is easier to maintain. Whichever you choose, test it before you travel by running each automation manually and checking the traces.
Is Home Assistant presence simulation enough to deter burglars?
No. Presence simulation is one visible measure, not a security system, and no study this article relies on shows it prevents a burglary on its own. UK police forces and councils recommend timers or smart bulbs alongside other habits: not leaving curtains closed all day, cancelling deliveries, locking doors and windows, not posting your travel dates online and asking a trusted neighbour to keep an eye on the house. A timed light placed beside a visible table lamp can even look suspicious, because it gives the game away. Treat the automations in this guide as one layer, and consider an alarm, a doorbell camera or a sensor-triggered outside light for the rest. Check your home insurance policy for any conditions about unoccupied periods.
Can Home Assistant turn on holiday mode automatically when I leave?
Yes, using the zone.home entity. Its state is the number of people currently in your home zone, so a state trigger on zone.home changing to 0 for 24 hours fires only after everyone has been away for a full day. That avoids switching holiday mode on every time you pop to the shops. The automation can then turn on your Holiday mode toggle and send a notification to your phone. A matching automation should turn the toggle off when zone.home rises above zero. This relies on the Home Assistant companion app reporting location reliably, so check its location permission settings first. If you would rather not depend on location tracking, flip the toggle by hand from the dashboard before you leave.

Sources

Sources verified 2026-10-22

  1. Home Assistant — Automation triggers (sun, time, zone, state)
  2. Home Assistant — Automation modes
  3. Home Assistant — Input Boolean integration
  4. Home Assistant — Delay building block
  5. GitHub — slashback100/presence_simulation README
  6. London Borough of Havering — Crime prevention
›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