The Person Is Still There, but the Light Goes Out: Why Does Automatic Lighting Keep Getting It Wrong?

Why do smart lights turn off while someone is still in the room? Diagnose motion sensing, stale delays, automation modes, manual overrides and restart behavior.

You walk into a room and the light comes on automatically. So far, so good. You sit down to read for a while, and the light suddenly goes out. You wave your hand, and it comes back on.

When this happens, many people first change the delay from two minutes to five. The light does stay on longer, but the problem may not go away: sit still for long enough and it may still turn off while you are there; leave the room and it may stay on unnecessarily for a long time.

The problem is often more than “the delay is too short.” What the sensor reports, when the timer starts, and whether the current state is checked when the timer expires are three different things.

The examples below use automatic lighting to explain these distinctions. The timelines and rules are design examples; no hardware tests were performed with specific sensors. Home Assistant’s behavior also does not mean every platform works the same way.

“No Motion” Does Not Necessarily Mean “No One Is in the Room”

Start with what the sensor measures.

A typical PIR motion sensor detects motion through changes in infrared radiation within its field of view. It does not count each person in the room. Someone walking past may be easy to detect, while a person sitting and reading with little movement may not cause the device to keep reporting motion.

So “no motion detected recently” is not a synonym for “the room is definitely empty.”

A millimeter-wave presence sensor is another option. For example, Aqara’s official FP2 page describes detection of small movements and presence detection by zone, intended to address limitations of traditional motion detection when someone is sitting still.[1] But accuracy claims on a product page are not test results from your home, and switching to radar does not guarantee there will be no false readings.

Before choosing a sensor, test it in the intended location: whether it covers the places where people usually sit, whether it behaves as expected with multiple people in the room, and whether its zones correspond to the lights you want to control. You must also read the entity or zone state the rule actually uses, rather than an overview indicator in another app.

If the sensor fails to recognize that someone is still there, no amount of complexity in the automation can conjure up that missing information.

“Wait Five Minutes After Someone Enters” Is Not “Empty for Five Minutes”

Consider this hypothetical timeline:

Time What happens in the room Rule counting down from when the light first turned on
20:00 Motion is detected; the light turns on Starts a five-minute delay
20:03 Someone moves again, or a second person enters Whether the timer is updated depends on the rule and its execution mode
20:05 Someone is still in the room The old delay may expire and turn off the light

This rule measures “how long it has been since the first trigger.” It does not automatically establish “how long the room has been continuously empty.”

A design closer to the intended behavior is to start waiting only after an unoccupied state is detected; cancel that pending shutoff if presence is detected again; and, once the specified period has passed, check the state and any manual override before deciding whether to turn off the light.

Two or five minutes here is a parameter to validate, not a universal recommendation. People use a hallway differently from a study, and the sensor itself may hold its state for a while. Observe the resulting behavior from the moment real-world actions occur.

A New Trigger May Not Reset the Old Task at All

Home Assistant’s official documentation defines four automation modes.[2]

  • single: Does not start another run while the previous one is still running.
  • restart: A new trigger that meets the conditions stops the previous run and starts over.
  • queued: New runs wait in a queue until earlier runs finish.
  • parallel: Old and new runs execute independently.

If an automation is written as “turn on the light → wait five minutes → turn off the light,” another trigger during those five minutes may have different results under each mode.

single does not automatically extend the old delay when a new trigger occurs; parallel may leave several runs separately preparing to turn off the light; queued may leave outdated actions waiting in line.

restart can serve some requirements where every trigger should restart the countdown, but changing that one setting is not a complete fix. The automation must actually receive a new trigger, and the relevant conditions must be met.

Home Assistant’s trigger documentation makes clear that a trigger occurs at a particular moment. A state remaining true does not repeatedly trigger the automation.[3] If your motion entity remains in a “detected” state and the rule listens only for a change from “not detected” to “detected,” subsequent movement may not produce another state transition.

Define what the countdown is based on before choosing a mode. Do not treat the execution mode as a universal fix for lights turning off incorrectly.

Check the Current Situation Again Before Turning Off the Light

Even with the right timing logic, things can change during the wait: someone may reenter, the sensor may go offline, a family member may turn on a reading light manually, or another platform may activate a scene.

The shutoff rule can be designed around this logic:

Unoccupied continuously for the specified period → check that the sensor is still available, the room is still unoccupied, and no manual override is active → turn off the light.

This is a logic sketch, not a configuration that can be imported directly into any platform. The implementation depends on whether the platform supports sustained-state checks, canceling a timer, and checking conditions before an action.

Two boundaries are especially important.

First, an unknown state should not casually be treated as unoccupied. A disconnected sensor and a sensor explicitly reporting no one present are different inputs. Fault handling can depend on the situation, but a check for “not occupied” should not silently classify an unknown state as unoccupied.

Second, manual actions need an explicit priority. For example, a “reading mode” switch could suspend automatic shutoff while it is enabled and restore it when disabled. A visible override state is easier to explain and troubleshoot than trying to infer whether a particular light-on event was manual.

Do not infer manual override solely from the light being on: the automation may have just turned it on.

Does the Countdown Survive a Controller Restart?

A short trial without problems does not establish that behavior after a restart will meet expectations.

Home Assistant’s official documentation says a restart stops running automations; delays, waits, and trigger-duration timers already in progress do not automatically resume.[2][4]

If the countdown needs to survive a restart, a Timer helper with its restore option enabled is worth evaluating. But the Timer documentation also states that if a timer expires while Home Assistant is down, a timer.finished event will not be emitted on startup to make up for it.[5]

In other words, “the timer state can be restored” and “a missed action will be executed afterward” are still different things.

A system that needs to reassess lighting after recovery should have separate startup checks: wait until device states are available again, then decide what to do based on current occupancy, manual override, and time conditions. Do not unconditionally turn off every light at startup, and do not describe a recovery design as “it will definitely turn the light off after a restart.”

If the problem occurs during an internet outage, also check where the automation runs; see “Does Matter Still Work Without Internet?”.

Trace One Incorrect Shutoff Instead of Guessing

Note approximately when the light turned off incorrectly, then check the following in order:

  1. What did the sensor report at the time? Unoccupied, unknown, or continuously occupied? First establish whether the input matched reality.
  2. Which trigger started the shutoff task? A recent change to unoccupied, or an old task left running from several minutes earlier?
  3. What happened during the wait? Was a new trigger ignored, did it restart the task, or did it start another parallel run?
  4. Which conditions were checked before shutoff? Were current occupancy and manual override checked?
  5. What else can control this light? Do the manufacturer’s app, Home Assistant, and other platforms each have their own shutoff rule?

Home Assistant’s official guidance recommends checking automation traces first to distinguish between a missing trigger, a failed condition, an action error, and an unavailable device.[4] “The automation reported no error” does not, by itself, prove the device performed the intended action.

Try to change only one part at a time while troubleshooting. If you replace the sensor, change the delay, and switch modes simultaneously, it will be hard to tell which change helped even if the problem disappears.

Acceptance Checks Must Include “Person Sitting Still” and “Person Returning”

At a minimum, test normal entry and exit, sitting and reading, returning after a brief absence, multiple people leaving at different times, manually entering reading mode, sensor unavailability, and a control-platform restart.

Each time, record what actually happened, the sensor state, the trigger time, and the light’s actions. The acceptance criterion is not “the delay is set to five minutes.” It is whether the system meets the behavior you specified: it does not turn off the light while someone still needs it, it turns off according to the rule after confirming the room is empty, and it behaves predictably during faults and manual overrides.

The hard part of automatic lighting is usually not turning a light on once. It is having enough grounds for every decision to turn it off.

References

Sources checked: November 8, 2026. Descriptions of Home Assistant behavior reflect the documentation checked for this article; consult each other platform’s own rules for triggers, timers, and recovery.

  1. Aqara: Presence Sensor FP2, the product’s descriptions of millimeter-wave sensing, presence by zone, and comparison with traditional PIR; this article did not verify its marketing accuracy claims or infer a specific Matter support status from them.
  2. Home Assistant: Automation modes, the four execution modes and the effect of a restart on running tasks.
  3. Home Assistant: Automation triggers, the distinction between a trigger event and a sustained state.
  4. Home Assistant: Troubleshooting automations, traces, conditions, actions, unavailable devices, and restart issues.
  5. Home Assistant: Timer, the restore option and the limitation that expiration during downtime does not emit a completion event afterward.

AI-generated conceptual illustration of smart lighting; not a hardware test photograph, actual product interface, or wiring diagram.

Discussion

Share a question or your experience. Comments appear after moderation. Your email is never displayed publicly. Comment privacy

Loading comments…