Routines That Fire Twice: De-Bouncing Smart Home Triggers

An automation that runs twice for one trigger is usually receiving duplicate events. Here is how to find the duplicate source and add de-bouncing.

Routines That Fire Twice: De-Bouncing Smart Home Triggers
Difficulty Intermediate
Estimated time 30 minutes
Last tested May 2026
Verified on HomeKit, Alexa, Google Home +1

Your motion sensor triggers a routine. The routine fires twice for a single motion event. Your lights turn on, then off, then on again, all from one walk through the doorway. Or your morning routine plays your music twice. Or your goodnight routine locks the doors and then reports an unlock attempt. The trigger is firing more than once and your automation is executing duplicates.

Why duplicates happen

Smart home triggers come from device events. The same event can be reported multiple times for several reasons:

  • The sensor itself sends multiple reports for one motion (especially aggressive PIR sensors)
  • A hub forwards an event to multiple integrations, each of which fires a routine
  • An event is captured by both a local automation and a cloud routine
  • Multiple sensors near each other both detect the same event and both fire the same routine

Identify the duplicate source

Open your hub’s event log if available. Look for the trigger time. Are there multiple events at the same time from the same device, or events from different devices that you did not realize would both trigger?

  • SmartThings IDE: events page shows device events with timestamps.
  • Hubitat: Logs tab, filter by the device.
  • Home Assistant: Logbook view, filter by the trigger device.
  • HomeKit: no user-accessible event log.

If you see two events at the same second from the same device, the sensor itself is double-reporting. If you see events from multiple devices, multiple sensors are triggering the same routine.

The aggressive PIR sensor

Some passive infrared sensors (PIR) report multiple times when motion continues. The first event is the initial detection. Subsequent events confirm motion is still happening.

If your routine triggers on “motion detected” with no de-bouncing, the routine fires on each report. Sit-still or moderate movement keeps reporting; your routine fires repeatedly.

The fix: change the routine’s trigger condition. Instead of “motion detected”, trigger on “motion changes from inactive to active”. This fires only on the transition, not on continued motion.

The cloud and local race

If you have both a cloud-based automation (via Alexa or Google) and a local automation (in HomeKit or SmartThings Edge) on the same trigger, both fire when the trigger occurs. You see two executions, one from each system.

Decide which one you want. Disable the duplicate.

Multiple sensors covering the same area

If you have a motion sensor in a hallway and a contact sensor on a nearby door, opening the door may trigger both. If both feed the same routine, you get duplicate triggers.

Either combine the triggers (“motion OR door open” so the routine fires once on either) or use only one of them.

Add a cooldown period

Most automation systems support a cooldown or rate-limit on routines. After the routine fires, it cannot fire again for a configured period (5 minutes, 1 hour, etc).

  • HomeKit: built into the automation editor as a delay.
  • SmartThings: use a virtual switch as an intermediary that resets after a delay.
  • Home Assistant: trigger conditions can include “only if last triggered more than X minutes ago”.
  • Alexa: routines do not have native cooldown; use a virtual device.

A simple cooldown solves most duplicate-fire issues even when the underlying duplicate cause is not fully understood.

The virtual switch debouncer

The pattern: create a virtual switch (a switch with no physical device, just a state in the hub). The motion trigger turns the virtual switch on if it is currently off, and runs the routine actions. After a delay, the virtual switch turns off automatically. Subsequent motion events ignore the trigger because the virtual switch is already on.

This pattern works in any hub that supports virtual switches. SmartThings, Hubitat, and Home Assistant all do.

Aqara double-firing

Aqara motion sensors are known for aggressive reporting. By default, after motion is detected, they continue to report “motion” for about 90 seconds, then report “no motion”. During that 90 seconds, depending on the hub, you may see multiple motion events.

The fix is hub-side: configure the hub to only act on the initial motion event, not subsequent reports during the cooldown.

The doorbell double-press

Smart doorbells often fire twice when pressed because the press generates an immediate event and then a confirmed event after the button release. Some integration layers forward both.

De-bounce: set your routine to ignore subsequent doorbell triggers within 10 seconds of the first.

Multi-action versus single-action triggers

If your routine has multiple actions that each have their own retry logic, you may see what looks like duplicate triggers but is actually a single trigger with retries.

Example: a routine that turns on three lights. If the first command fails (Wi-Fi blip), the system retries. Each retry may execute the rest of the routine. You see the light come on twice (once from the retry, once from the original) and assume the trigger fired twice.

Check whether the rest of the routine also executed twice. If only one specific action duplicated, the issue is action-level retry, not trigger-level duplication.

The location-based duplicate

If you use geofencing to trigger routines on arrival, and you have multiple devices in your household (your phone, your spouse’s phone), both arrivals can trigger the same routine in succession.

Filter the trigger to a specific person, or use “any person arrives” with a cooldown.

The reconnection cascade

After a network outage or power blip, devices reconnect in sequence and may report their state changes during reconnection. If your routine triggers on a state change, the reconnect reports can fire the routine even when the actual state did not change.

Add a condition to the routine that excludes the recent post-startup period (“do not trigger within 5 minutes of hub boot”).

What to do if you cannot find the duplicate source

If duplicates persist and you cannot identify the cause from logs, add a cooldown to the routine itself. A 30-second to 2-minute cooldown silences most duplicate-fire issues even when the root cause is opaque.

This is treating the symptom rather than the cause, but for routines where double-execution is annoying rather than dangerous, it is a pragmatic fix.

Works with
HomeKitAlexaGoogle HomeSmartThings

Frequently asked questions

Why does my routine sometimes fire twice and sometimes once?

Intermittent duplicates often trace to network timing. When the network is fast, both triggers arrive within the engine's tolerance and are de-duplicated. When slow, they arrive separately and both fire.

Will a cooldown delay my routine response?

No. The cooldown applies to the time between consecutive firings, not the time before the first firing. Your routine still responds immediately to the initial trigger.

Can I see how often a routine has fired?

Depends on the platform. Hubitat and Home Assistant track execution history. SmartThings and Alexa do not expose this clearly.

Does the cooldown reset if I trigger it again?

Yes, typically. Each trigger restarts the cooldown clock. If you do not want this, use a sticky lockout instead of a sliding cooldown.

Why does Alexa not have a built-in cooldown?

Alexa routines were designed for simple, predictable triggers. Complex de-bouncing was not a design priority. The workaround is a virtual switch in another hub that Alexa observes.

If two routines do the same thing, will they both fire?

Yes. The engine does not de-duplicate routines that target the same device with the same action. Delete one of them or merge them.