Simulate occupancy with randomized lighting while away to deter burglars

Last updated:

Includes Home Assistant automation

This automation cycles lights on and off across rooms at randomized times while you are away, imitating how a person moves through a house after dark. A single lamp on a fixed timer does the opposite, handing a watcher the repeating pattern that marks an empty house.

Automation flow: Every 15 minutes or At 23:30Flow diagram of the automation. Every 15 minutes to home is empty; At 23:30 to home is empty; home is empty, on "no", to Nothing happens; home is empty, on "At 23:30", to home is empty; home is empty, on "no", to Nothing happens; home is empty, on "yes", to Turn off every light; home is empty, on "yes", to time 17:00 to 23:30; time 17:00 to 23:30, on "no", to Nothing happens; time 17:00 to 23:30, on "yes", to Wait 0 to 11 minutes; Wait 0 to 11 minutes to home is empty; home is empty, on "no", to Nothing happens; home is empty, on "yes", to time 17:00 to 23:30; time 17:00 to 23:30, on "no", to Nothing happens; time 17:00 to 23:30, on "yes", to Toggle a random light.noAt 23:30noyesyesnoyesnoyesnoyesEvery 15 minutesAt 23:30home is emptyNothing happenshome is emptyTurn off every lighttime 17:00 to 23:30Wait 0 to 11 minuteshome is emptytime 17:00 to 23:30Toggle a random light
Trigger Condition Action Wait Nothing

What you need

  • Smart lights in a few different rooms: smart bulbs, smart switches, or ordinary lamps on smart plugs. The more rooms you can light on their own, the more convincing the effect.
  • A way to know the house is empty: a phone location trigger, the same geofencing that can turn your thermostat down when you leave, or a plain evening schedule if you would rather leave your location out of it.
  • Somewhere to run the sequence. Philips Hue and Amazon Alexa each have a version built in; Home Assistant, Homey, or SmartThings let you build it yourself.

How it works

Everything hinges on the word "timer." Put one lamp on a schedule that clicks on at 7:00 every evening and off at 11:00, and you have not made the house look lived-in. You have published a loop, and a few nights of watching is all it takes to read it.

A convincing version breaks that loop in two directions at once. It moves between rooms, lighting the kitchen now and the landing twenty minutes later, the way a person actually drifts through a house. And it jitters the timing, so tonight's run never matches last night's.

Presence simulation only helps while it is not a pattern. A fixed nightly schedule is the exact regularity a patient watcher waits for, so the setups that fool anyone spend their effort on being irregular rather than on being bright.

Where it runs without extra hardware

For most people this is a feature to switch on, not a project. Philips Hue builds it in as Mimic Presence. Open the Automations tab, pick the rooms, and choose whether it runs all day or only after dark; it randomizes the rest. Amazon's Alexa does the same through Away Lighting, and TP-Link's Kasa switches carry an away mode that shuffles them for you.

Apple Home and Google Home have no equivalent built in. You can still improvise one on HomeKit, but only bluntly: a location trigger that switches the same scene on every time you leave. That is the fixed pattern all over again, so treat it as better than a dark house, not as a real disguise.

SmartThings and Homey can run it too, though you build the routine yourself rather than flipping a switch. On Home Assistant you get the fullest control. The automation below toggles a random light from a list every so often, but only while the presence count is zero, and it checks that count again after its random pause so a light never flips just as someone walks in. At the end of the evening window it switches the whole list back off, provided the house is still empty. Swap in your own entity names.

Watch out for

  • A house lit all night is its own giveaway. Nobody leaves every room burning at 3am, so end the run at bedtime and make sure it switches the lights off rather than merely stopping. A routine that only stops toggling leaves whatever happened to be on still burning until you get back, which is the pattern you were trying to avoid.
  • Key it to the last person out, not just to you. If the trigger follows a single phone, it will start its routine while the rest of the household is home on the sofa. Wait for the home to be genuinely empty.
  • This deters, it does not defend. Simulated lighting discourages the opportunist sizing up an empty house, but it does nothing once someone is inside, so it belongs alongside cameras and sensors rather than in place of them.

This idea is shared for inspiration only, not professional advice. If it involves wiring, breakers, or high-draw appliances, verify ratings and your local electrical code, or hire a licensed electrician. Read our full disclaimer.

Get the Home Assistant Automation YAML

Validated against Home Assistant 2026.8.3 Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Example automation (Home Assistant). A starting point; swap in your own entity names.

alias: Simulate occupancy with rotating evening lights
description: >-
  While the house is empty after dark, switch a randomly chosen light on or off
  every so often, so the home shows the uneven pattern of someone using it
  rather than a fixed timer a watcher can learn. At the end of the window every
  light goes back off, so an empty house is not left burning all night.
triggers:
  - trigger: time_pattern
    minutes: "/15"
    id: tick
  - trigger: time
    at: "23:30:00"
    id: lights_out
conditions:
  - condition: numeric_state
    entity_id: zone.home
    below: 1
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: lights_out
        sequence:
          # Queued behind an in-flight pause, this can run minutes after it was
          # triggered, so confirm the house is still empty rather than darkening
          # rooms someone has just walked into.
          - condition: numeric_state
            entity_id: zone.home
            below: 1
          - action: homeassistant.turn_off
            target:
              entity_id:
                - light.living_room
                - light.kitchen
                - switch.hallway_lamp
                - light.bedroom
      - conditions:
          - condition: time
            after: "17:00:00"
            before: "23:30:00"
        sequence:
          - delay:
              minutes: "{{ range(0, 12) | random }}"
          # The pause can outlast both the empty house and the window itself, so
          # re-read them rather than acting on values up to eleven minutes old. The
          # window re-check is what stops a late toggle re-lighting the house after
          # the end-of-window switch-off has already run.
          - condition: numeric_state
            entity_id: zone.home
            below: 1
          - condition: time
            after: "17:00:00"
            before: "23:30:00"
          - action: homeassistant.toggle
            target:
              entity_id: >-
                {{ ['light.living_room', 'light.kitchen', 'switch.hallway_lamp',
                    'light.bedroom'] | random }}
mode: queued
max: 3

That automation is yours to keep

Get a fresh idea like it - plus the week's smart home news and gear - in your inbox every Friday. Free, and unsubscribing is one click.

Related Ideas

Tagged: home-security, lighting, presence-simulation, away-mode

Want more ideas like this?

Fresh automation ideas plus the smart home news and gear worth knowing, in your inbox every Friday.