TapHome

Delay

The Delay smart rule adds a waiting period between a trigger and a response. Instead of reacting immediately, it waits before executing actions — and can wait again before stopping them.

For example: a motion sensor detects movement, waits 5 seconds to confirm it is real, then turns on the lights. Once motion stops, it keeps the lights on for 10 more minutes before turning them off.

Getting started

Setting up a Delay smart rule takes three steps:

  1. Add triggers — define what starts the smart rule.
  2. Set delays — configure how long to wait before and after actions.
  3. Add actions — define what happens when each delay expires.

Basic example

You have a motion sensor in the hallway. You want the hallway light to turn on when motion is detected and stay on for 5 minutes after the last motion.

  1. Create a new Delay smart rule.
  2. In the Triggered by section, tap Add trigger to open the trigger configuration page.
  3. Tap Add Device and select your hallway motion sensor.
  4. Set the value type to Motion, the trigger condition to Value equals, and the value to Motion spotted.
  5. Go back to the smart rule page.
  6. Leave the Start delay at 0 seconds (react immediately).
  7. In the Start actions section, tap Add New Action and set the hallway light to On.
  8. Set the End delay to 5 minutes.
  9. In the End actions section, tap Add New Action and set the hallway light to Off.
  10. Tap Save.

When the motion sensor detects movement, the light turns on immediately. It stays on as long as the sensor sees motion. When motion stops, the 5-minute countdown begins. If the sensor detects motion again during those 5 minutes, the countdown is cancelled and the light stays on — the 5-minute wait starts over only after the motion stops again. When the full 5 minutes pass with no motion, the light turns off.

Triggers

The Triggered by section defines what starts the smart rule. Tap Add trigger to open the trigger configuration page, where you select devices to monitor, a value type, and a trigger condition. For configuration details, see Triggers.

You can add multiple triggers to the same smart rule. The smart rule activates when any one of them is active (OR logic).

Event triggers vs state triggers

The trigger condition you choose determines whether the trigger is a state type or an event type. This distinction is fundamental to how the Delay smart rule behaves — see How the delay cycle works for details.

All triggers in a single Delay smart rule must be the same kind. After you add your first trigger, the smart rule locks to that kind and only shows matching conditions for additional triggers.

  • State triggers remain active as long as the condition is true. The start actions stay in effect while the condition holds. The end delay grace period begins when the condition becomes false.
  • Event triggers fire momentarily (a pulse). Each new event restarts the end delay timer, extending the grace period.

Trigger devices cannot be used as action targets within the same smart rule. This prevents feedback loops where an action would trigger its own smart rule.

Start delay

Optional delay before executing Start actions. If the trigger condition becomes false during this period, the entire cycle is cancelled.

The start delay is a waiting period before the Start actions execute. Use it to filter out brief or accidental triggers — for example, waiting a few seconds to confirm that a door is actually left open rather than just being briefly opened.

Set the duration using the time picker. You can specify days, hours, minutes, seconds, or milliseconds.

ParameterRangeDefault
Start delay0 and above0 (no delay)

Setting the start delay to 0 skips the waiting phase entirely — actions execute immediately when the trigger activates.

If the trigger condition becomes false during the start delay, the entire cycle is cancelled. The start actions never execute and the smart rule returns to its idle state.

Start actions

Actions to execute after the Start delay. These run when the timer begins its active phase.

Tap Add New Action to add device actions that execute after the start delay expires. You can add multiple actions — they all execute together.

You can also add a notification action (one per section) by tapping the notification bell icon in the section header. This sends a push notification to selected user groups or individual users when the actions execute.

End delay

The end delay controls how long the start actions remain in effect after the trigger is no longer active. When the timer expires, the End actions execute and the smart rule returns to idle.

ParameterRangeDefault
End delay500 milliseconds and above60 seconds

How the end delay starts depends on the trigger kind:

  • Event triggers: The end delay starts immediately after the start delay expires. Each new trigger event restarts the end delay timer, extending the duration. Think “how long to keep going after the last event”.
  • State triggers: The end delay starts when the trigger condition becomes false. While the trigger remains true, the active phase continues indefinitely — the end delay does not begin. Think “how long to keep going after the condition stops being true”.

End actions

Actions to execute when the timer completes. These run after the End delay. Typically, end actions are not needed - when the smart rule stops returning a value, the device will receive a value from another active smart rule with lower priority, or fall back to its default value.

Tap Add New Action to add device actions that execute when the end delay expires. These are typically the “undo” actions — turning off what the start actions turned on.

You can also add a notification action by tapping the notification bell icon.

How the delay cycle works

The Delay smart rule operates as a two-phase cycle: start delay followed by end delay. The cycle behaves differently depending on whether you use event triggers or state triggers.

State trigger cycle

State triggers remain active as long as a condition is true (e.g., “Motion, Value equals Motion spotted”).

  1. Trigger activates — the condition becomes true.
  2. Start delay begins counting down. If the trigger becomes false during this phase, the entire cycle is cancelled.
  3. Start delay expires — the Start actions execute. The smart rule enters its active phase.
  4. Active phase — the start actions remain in effect as long as the trigger stays true. No end delay counting occurs yet.
  5. Trigger deactivates — the condition becomes false. The End delay grace period begins.
  6. Trigger reactivates during grace period — if the condition becomes true again before the end delay expires, the grace period is cancelled and the smart rule returns to step 4 (active phase).
  7. End delay expires — the End actions execute. The cycle is complete and the smart rule returns to idle.

Event trigger cycle

Event triggers fire momentarily (a single pulse each time). They do not stay active.

  1. Trigger fires — a trigger event occurs.
  2. Start delay begins counting down. If a new event fires during the start delay, the start delay timer restarts from the beginning.
  3. Start delay expires — the Start actions execute. The End delay grace period begins immediately.
  4. Grace period — the start actions remain in effect while the end delay counts down.
  5. New event during grace period — each new trigger event restarts the end delay timer, extending the grace period.
  6. End delay expires — the End actions execute. The cycle is complete.

System restart

If the system restarts while a delay cycle is in progress, the smart rule resumes where it left off. The start and end delay timers are persisted — if enough time has elapsed during the restart, the smart rule may advance through the remaining phases immediately.

Examples and scenarios

Motion-activated hallway light with grace period

Goal: Turn on the hallway light when motion is detected. Keep it on for 10 minutes after the last motion.

Configuration:

  • Triggered by: motion sensor, “Motion, Value equals Motion spotted” (state trigger)
  • Start delay: 0 seconds
  • Start actions: hallway light → On
  • End delay: 10 minutes
  • End actions: hallway light → Off

Behavior: The light turns on immediately when motion is detected. As long as the sensor sees motion, the light stays on. When motion stops, a 10-minute countdown begins. If the sensor detects motion again during those 10 minutes, the countdown resets. When the full 10 minutes pass with no motion, the light turns off.

Multiple motion sensors in a room

Goal: Keep the living room lights on when any of three motion sensors detects movement. Turn off 5 minutes after all sensors are clear.

Configuration:

  • Triggered by: three motion sensors, each “Motion, Value equals Motion spotted” (state triggers)
  • Start delay: 0 seconds
  • Start actions: living room ceiling light → On, living room floor lamp → On
  • End delay: 5 minutes
  • End actions: living room ceiling light → Off, living room floor lamp → Off

Behavior: The lights turn on when any sensor detects motion. They stay on as long as at least one sensor sees motion — the smart rule uses OR logic across triggers. When all three sensors stop detecting motion, the 5-minute grace period begins. If any sensor detects motion during those 5 minutes, the grace period is cancelled and the lights stay on. After 5 minutes with no motion from any sensor, both lights turn off.

Bathroom ventilation after leaving

Goal: When someone uses the bathroom and leaves, turn on the exhaust fan after confirming they are gone. Keep it running for 15 minutes to clear the air.

Configuration:

  • Triggered by: bathroom presence sensor, “Value changed to Away” (event trigger)
  • Start delay: 2 minutes
  • Start actions: bathroom exhaust fan → On
  • End delay: 15 minutes
  • End actions: bathroom exhaust fan → Off

Behavior: While someone is in the bathroom, nothing happens. When the presence sensor stops detecting anyone, the event fires and the 2-minute start delay begins. If the person briefly returns and leaves again during those 2 minutes (another “changed to Away” event), the start delay restarts — filtering out brief interruptions. After 2 minutes with no new events, the fan turns on and runs for 15 minutes. If someone enters and leaves again during those 15 minutes (another event), the 15-minute timer restarts. When the full 15 minutes pass, the fan turns off.

Conference room climate on confirmed occupancy

Goal: Switch the conference room thermostat to comfort mode when someone is present for more than 5 minutes. Revert to eco mode 15 minutes after everyone leaves.

Configuration:

  • Triggered by: conference room presence sensor, “Presence, Value equals Home” (state trigger)
  • Start delay: 5 minutes
  • Start actions: conference room thermostat → 22 °C
  • End delay: 15 minutes
  • End actions: conference room thermostat → 18 °C

Behavior: When the presence sensor detects someone, the 5-minute start delay begins. If the room empties before 5 minutes are up (someone just grabbed a cable or checked the schedule), the start delay is cancelled and the thermostat stays at eco. After 5 confirmed minutes of occupancy, the thermostat switches to 22 °C. It stays at 22 °C as long as the sensor detects presence. When everyone leaves, the 15-minute grace period begins. If someone returns during those 15 minutes, the grace period is cancelled and the room stays at 22 °C. After 15 minutes with no presence, the thermostat drops back to 18 °C.