Light Controller
The Light Controller controls one or more lights using push buttons and motion sensors. Buttons handle direct control — short press to turn on/off, long press to raise or lower — while sensors handle automatic turn-on and turn-off. When both are configured, a manual button press temporarily overrides the sensors.
Getting started
Setting up the Light Controller takes three steps:
- Add lights — select the lights you want to control.
- Add buttons — map push buttons to toggle, raise, or lower behavior.
- Add sensors (optional) — configure motion or presence sensors for automatic turn-on and turn-off.
Basic example
You want a wall switch to toggle the hallway light, with a motion sensor to turn it on automatically at night.
- Create a new Light Controller smart rule.
- In the Lights section, tap Add Device and select the hallway light.
- In the Control Buttons section, tap Add Button and select the wall switch. Choose Toggle as the button type.
- In the Automatic Turn On section, tap Add Sensor and select the motion sensor.
- The default Automatic Turn On settings turn the lights to 80% within the active time window (sunset to sunrise). Adjust if needed.
- In Override Automatic Control With a Button, set “When light is turned on with a button” to For a fixed time (for example, 5 minutes). This ensures the motion sensor resumes automatically after a manual button press.
- Tap Save.
The hallway light now toggles on short press, rises or lowers on long press, and turns on automatically when motion is detected at night. After 5 minutes with no motion, the light turns off. If you turn the light on with the button, the motion sensor pauses for 5 minutes, then resumes.
By default, the on-override is set to Until turned off with a button — the motion sensor stays suppressed until you press the button again to turn the lights off. Step 6 changes this to a timed override so the sensor resumes automatically.
Lights
Tap Add Device to select one or more lights. You can add dimmable lights, color lights, or simple on/off switches.
Master light
One light is designated as the master. The master light’s current brightness determines the behavior of toggle buttons — whether a short press turns the lights on or off.
If you have multiple lights, the first one added is automatically set as master. To change the master, tap the light and select Set as Master from the menu.
If you add multiple lights, make sure to set the master to the light that best represents the overall group state. The master light’s brightness represents the current state of all lights for the toggle buttons.
Control buttons
In this section, you can map button gestures to brightness behavior.
Tap Add Button to add one or more push button devices. After selecting device(s), choose the button type:
| Button type | Short press | Long press (hold) |
|---|---|---|
| Toggle | Turns lights on/off based on master light state | Raises or lowers (direction flips on each hold) |
| Turn on | Turns lights on | Always raises |
| Turn off | Turns lights off | Always lowers |
Short press
When short press is enabled (the default), pressing a button quickly toggles the lights. The toggle direction depends on the master light’s current state:
- Fully off — turns on all lights
- Fully on (100%) — turns off all lights
- Partial brightness — reverses the previous direction (if the last action raised the lights, short press turns off, and vice versa)
You can configure the turn-on behavior:
| Setting | Effect |
|---|---|
| Value (default: 100%) | All lights turn on to the configured brightness percentage |
| Last Value | All lights return to their previous brightness |
Short press actions apply a fade effect (default: 250 ms). To change the duration, tap Configure in the Control Buttons section.
Long press (hold)
Holding a button raises or lowers the lights over time. By default, a full 0–100% sweep takes 5 seconds. To change the speed, tap Configure in the Control Buttons section.
Toggle buttons alternate direction on each hold. If holding raised the lights, the next hold will lower them.
Turn on buttons always raise. Turn off buttons always lower.
Releasing the button stops at the current brightness level. For dimmable lights, the brightness holds at whatever level it reached. For on/off switches, releasing while raising turns the light on, and releasing while lowering turns it off.
Push button settings
Tap Configure in the Control Buttons section to access detailed button settings:
| Setting | Description | Default |
|---|---|---|
| Short Press — Enabled | Whether short press toggles lights | On |
| Toggle Between: 0% and… | Value or Last Value | Value (100%) |
| Fade Time 0→100% | Short press fade speed | 250 ms |
| On Long Press — Fade Time 0→100% | Long press fade speed | 5 s |
| Minimum Value | Brightness floor when lowering | 10% |
Minimum Value: When lowering, the brightness decreases until it reaches this value, then pauses. To continue lowering to zero, hold the button again. This two-stage behavior prevents accidentally turning the lights off when you only wanted to dim them. If set to 0%, the light goes straight to zero without pausing.
When Toggle Between: 0% and… is set to Value, Minimum Value is capped at 1% below the short press on-value. This ensures that dimming down always goes below the level that short press turns on to.
If any push button device does not support long press, a warning appears in the configuration page with a Fix this button. Tap it to enable long press in the device’s hardware settings.
Custom button actions
Beyond the standard toggle and dimming behavior, you can assign custom actions to specific push buttons. Custom actions support all press types: short press, long press, double click, and triple click.
Tap Set Custom Actions on the main page to open the configuration.
Adding a custom button
- Tap Add Button in the Buttons section of the custom actions page.
- Select one or more push button devices.
- For each press type (short press, long press, double click, triple click), choose an action:
| Action | Effect |
|---|---|
| No action | Press type is ignored |
| Custom Actions | Executes the custom actions list (defined below) |
| Turn off | Turns off the lights targeted by custom actions |
| Toggle | If lights are on, turns them off. If lights are off, executes custom actions. |
Double click and triple click options only appear if the selected push button hardware supports them. When adding multiple buttons at once, only capabilities shared by all selected devices are shown.
Custom actions list
Below the push buttons, you can define the list of device actions that execute when a button triggers “Custom actions.” Tap Add New Action in the Execute Action section to add actions for specific lights — for example, set one light to 50% brightness while setting another to a specific color.
The Execute Action section only appears when at least one button has Custom Actions or Toggle assigned to any of its press types.
Automatic turn-on
Ideal for circulation spaces where nighttime activation won't disturb anyone—such as staircases and hallways.Add motion sensors or reed contacts to the Automatic Turn On section. When any selected sensor becomes active, the configured action executes.
Turn-on action
Choose what happens when a sensor triggers:
| Option | Effect |
|---|---|
| Value | All lights turn on to a configurable brightness (default: 80%) |
| Last Value | All lights return to their previous brightness |
| Custom Actions | Execute a custom list of device actions (configured separately) |
When using custom actions, you can define per-light actions on a separate page — for example, set the hallway light to 30% while setting the stairway light to 50%.
For a specified time
When no automatic turn-off sensors are configured, For a specified time determines how long the lights stay on after all turn-on sensors become inactive. The default is 5 minutes.
For a specified time is only visible when no automatic turn-off sensors are configured. When turn-off sensors are present, the turn-off delay (see below) controls the timing instead.
Turn-on conditions
Tap Configure in the Automatic Turn On section to restrict when sensors can trigger lights.
Time Condition for Motion Sensor
Check Motion sensor can only trigger lights in time interval... to limit automatic turn-on to a specific time interval. The default window runs from On sunset to On sunrise — ideal for lights that should only activate at night.
Each endpoint can use one of three modes:
| Mode | Description |
|---|---|
| Time | A specific hour and minute |
| On sunrise | Relative to sunrise, with an offset |
| On sunset | Relative to sunset, with an offset |
When using On sunrise or On sunset, a slider lets you set an offset from the sun event time. A description below the slider shows the next actual sunrise or sunset time at your location.
The start and end points cannot both use the same sun event. If you set the start to On sunrise, the end’s sunrise option becomes unavailable (and vice versa for On sunset). You can freely combine one sun event with a fixed time.
Limit by Brightness Sensor
Optionally, add a brightness sensor to prevent lights from turning on when it is already bright enough. When selected, a Brightness Is Less Than threshold slider appears:
- Percentage sensors — threshold from 0% to 100%
- Lux sensors — threshold from 0 to 1000 lux
Lights only turn on automatically when the ambient brightness is below the configured threshold. The default threshold is 30 (percentage or lux, depending on the sensor type).
A live reading below the slider shows the current brightness value from the sensor.
The brightness sensor uses hysteresis to prevent rapid toggling near the threshold. A small band around the threshold value prevents the sensor from rapidly switching between “bright enough” and “too dark.”
Automatic turn-off
The Lights Will Automatically Turn Off If None of the Selected Sensors Is Active. Delay defines the grace period after the last activity before turning off. You may use a different sensor list here than for Automatic Turn On.Presence sensors work best here — they remain active as long as someone is in the room, keeping the lights on continuously. Motion sensors also work but may go inactive between movements.
Turn-off Delay
When all turn-off sensors become inactive, the Light Controller waits for the configured Turn-off Delay before turning the lights off. The default is 5 minutes.
The delay is specified in minutes and seconds, and acts as a grace period — if any sensor becomes active again before the delay expires, the timer resets and the lights stay on.
When the lights turn off automatically, they return to automatic control. This means other smart rules that control the same devices can take over.
Override automatic control with a button
Defines how long manual on/off suppresses automation.When you press a button to turn lights on or off, the Light Controller temporarily suppresses automatic sensor behavior. This prevents the automation from immediately undoing your manual action — for example, if you manually turn off the hallway light, the motion sensor will not turn it right back on.
Tap Override Automatic Control With a Button on the main page to configure two independent timeouts:
When light is turned on with a button
After a manual turn-on, automatic control is suppressed for the configured duration. Choose either:
- Until turned off with a button — override lasts until you press a button to turn the lights off
- For a fixed time — override lasts for a specific duration (default: 5 minutes)
When light is turned off with a button
After a manual turn-off, automatic control is suppressed for the configured duration. Choose either:
- Until turned on with a button — override lasts until you press a button to turn the lights on
- For a fixed time — override lasts for a specific duration (default: 1 minute)
After the override expires, the automation resumes normally. If a sensor is already active at that moment, the smart rule re-evaluates and may immediately trigger an automatic action.
At least one of the two overrides must use For a fixed time. You cannot set both to Until turned off with a button / Until turned on with a button simultaneously — this would create a circular dependency where neither override can ever expire.
Examples and scenarios
Hallway with motion sensor: auto-on at night
Goal: The hallway light turns on at 50% when motion is detected at night, and turns off 3 minutes after the last detected motion.
Configuration:
- Lights: hallway light (master — only one light, so automatically master)
- Control Buttons: wall switch (Toggle)
- Push button settings (Configure):
- Short Press — Enabled: On (default)
- Toggle Between: 0% and…: Value, 100% (default)
- Fade Time 0→100%: 250 ms (default)
- On Long Press — Fade Time 0→100%: 5 s (default)
- Minimum Value: 10% (default)
- Custom Actions: none configured
- Automatic Turn On sensors: hallway motion sensor
- Turn-on action: Value, 50%
- Configure (Automatic Turn On):
- Motion sensor can only trigger lights in time interval...: On, from On sunset to On sunrise (default)
- Limit by Brightness Sensor: none configured
- For a specified time: not visible — hidden because automatic turn-off sensors are configured
- Automatic Turn Off sensors: hallway motion sensor (same sensor used for both turn-on and turn-off)
- Turn-off Delay: 3 minutes
- Override Automatic Control With a Button (on): For a fixed time, 10 minutes
- Override Automatic Control With a Button (off): For a fixed time, 1 minute (default)
Behavior: At night, walking into the hallway triggers the motion sensor and the light turns on to 50%. When you leave and the sensor goes inactive, the light stays on for 3 more minutes, then turns off. If you manually press the wall switch to turn the light off, the motion sensor is suppressed for 1 minute — walking past will not re-trigger the light. If you press the switch to turn the light on, the motion sensor is suppressed for 10 minutes. During the day (outside the sunset-to-sunrise window), the motion sensor is ignored, but the wall switch still works normally — short press toggles on/off, long press raises or lowers.
Living room with multiple lights: dimming control
Goal: A single wall switch controls the ceiling light and two floor lamps. Short press toggles all three to their last brightness, long press dims them together. No automation — buttons only.
Configuration:
- Lights: ceiling light (master), floor lamp left, floor lamp right
- Control Buttons: wall switch (Toggle)
- Push button settings (Configure):
- Short Press — Enabled: On (default)
- Toggle Between: 0% and…: Last Value
- Fade Time 0→100%: 250 ms (default)
- On Long Press — Fade Time 0→100%: 5 s (default)
- Minimum Value: 15%
- Custom Actions: none configured
- Automatic Turn On sensors: none configured — no automation, buttons only
- Automatic Turn Off sensors: none configured
- Override Automatic Control With a Button: irrelevant — override only affects automatic sensor behavior, and no sensors are configured
Behavior: A short press on the wall switch toggles all three lights between off and their last known brightness. The ceiling light is master — when it is fully off, short press turns on; when fully on, short press turns off; at partial brightness, the direction alternates from the last action. Holding the switch raises or lowers all lights simultaneously — the first hold after a short-press-on lowers, because the direction flips on each hold. When lowering, the lights pause at 15% brightness. Holding again continues lowering to zero. Holding the switch again after reaching zero raises toward 100%.
With Last Value mode, the Minimum Value can go up to 99% (there is no cross-constraint with the short press value). With Value mode, Minimum Value cannot exceed the short press value minus 1%.
Bedroom with separate raise/lower switches
Goal: Two wall switches near the bed — one for raising, one for lowering. Long press moves in a single direction. Short press is disabled entirely to avoid accidental toggles at night.
Configuration:
- Lights: bedside lamp (master — only one light)
- Control Buttons:
- Left switch: Turn on — long press always raises
- Right switch: Turn off — long press always lowers
- Push button settings (Configure):
- Short Press — Enabled: Off (disables short press on ALL control buttons — both switches)
- On Long Press — Fade Time 0→100%: 8 s (slower for precise control in bed)
- Minimum Value: 5% (very dim night-light level before turning off)
- Toggle Between: 0% and…, short press value, Fade Time 0→100%: irrelevant — short press is disabled, these settings have no effect
- Custom Actions: none configured
- Automatic Turn On sensors: none configured
- Automatic Turn Off sensors: none configured
- Override Automatic Control With a Button: irrelevant — no sensors configured
Behavior: Holding the left switch always raises the lamp toward 100%. Holding the right switch always lowers — pausing at 5% before going to zero. Neither switch responds to short press because short press is disabled globally. Releasing either switch stops at the current brightness.
Short Press — Enabled is a global setting — it applies to all control buttons in the smart rule, not per-button. If you need short press on some buttons but not others, consider using Set Custom Actions to override specific buttons.
Staircase with custom button actions: color scenes
Goal: Two switches control the staircase LED strip — a wall switch for standard on/off and dimming, and a smart button for activating a warm color scene. Motion sensor handles automatic operation at night.
Configuration:
- Lights: staircase LED strip (master — only one light)
- Control Buttons: wall switch (Toggle) — for short press toggle and long press dimming
- Push button settings (Configure):
- Short Press — Enabled: On (default)
- Toggle Between: 0% and…: Value, 100% (default)
- Fade Time 0→100%: 250 ms (default)
- On Long Press — Fade Time 0→100%: 5 s (default)
- Minimum Value: 10% (default)
- Set Custom Actions: smart button (a separate device from the wall switch)
- Short press action: No action
- Long press action: No action
- Double click action: Custom Actions
- Tripple click action: Turn off
- Execute Action: set LED strip to warm white color, 40% brightness
- Automatic Turn On sensors: staircase motion sensor
- Turn-on action: Value, 60%
- Configure (Automatic Turn On):
- Motion sensor can only trigger lights in time interval...: On, from 20:00 (Time) to 07:00 (Time)
- Limit by Brightness Sensor: none configured
- For a specified time: not visible — hidden because automatic turn-off sensors are configured
- Automatic Turn Off sensors: staircase motion sensor
- Turn-off Delay: 2 minutes
- Override Automatic Control With a Button (on): For a fixed time, 15 minutes
- Override Automatic Control With a Button (off): For a fixed time, 2 minutes
Behavior: During nighttime hours (20:00–07:00), the motion sensor turns on the LED strip to 60% brightness. When motion stops, the strip stays on for 2 more minutes, then turns off. The wall switch handles standard control: short press toggles between on (100%) and off, long press raises or lowers brightness. A double click on the smart button activates the warm scene (40% warm white) — only custom actions can set both color and brightness. A triple click on the smart button turns the strip off. After any button press (wall switch or smart button), the motion sensor is suppressed — 15 minutes after turning on, or 2 minutes after turning off.
A push button device can be assigned to either Control Buttons or Set Custom Actions, but not both. Use separate physical buttons if you need both standard dimming control and custom scene activation.
Double click and triple click options only appear in the custom button configuration if the selected push button hardware supports them. If your switch does not report these capabilities, you will only see short press and long press.
Bathroom with brightness sensor: only when dark
Goal: The bathroom light turns on when the door opens, but only when it is dark. A presence sensor keeps the light on while someone is inside.
Configuration:
- Lights: bathroom ceiling light (master — only one light)
- Control Buttons: bathroom wall switch (Toggle)
- Push button settings (Configure):
- Short Press — Enabled: On (default)
- Toggle Between: 0% and…: Value, 100% (default)
- Fade Time 0→100%: 250 ms (default)
- On Long Press — Fade Time 0→100%: 5 s (default)
- Minimum Value: 10% (default)
- Custom Actions: none configured
- Automatic Turn On sensors: door reed contact
- Turn-on action: Value, 100%
- Configure (Automatic Turn On):
- Motion sensor can only trigger lights in time interval...: Off (allow activation at any time of day)
- Limit by Brightness Sensor: bathroom brightness sensor
- Brightness Is Less Than: 40%
- For a specified time: not visible — hidden because automatic turn-off sensors are configured
- Automatic Turn Off sensors: bathroom presence sensor (different device from the turn-on sensor)
- Turn-off Delay: 1 minute
- Override Automatic Control With a Button (on): For a fixed time, 30 minutes
- Override Automatic Control With a Button (off): For a fixed time, 5 minutes
Behavior: When the bathroom door opens and the ambient brightness is below 40%, the light turns on to full brightness. The presence sensor keeps the light on as long as someone is detected — the turn-off delay only starts when the presence sensor goes inactive. After the person leaves and the presence sensor goes inactive, the light stays on for 1 more minute, then turns off. If you manually turn the light off with the wall switch, the automation is suppressed for 5 minutes — the door sensor will not turn the light back on. On a bright day, opening the door does not trigger the light (brightness is above threshold), but the wall switch still works normally.
This example uses different sensors for turn-on (reed contact — fast trigger when door opens) and turn-off (presence sensor — sustained detection while someone is inside). You can also use the same sensor for both, as in the hallway example above.
Garage with custom auto-on actions and no turn-off sensor
Goal: A motion sensor turns on the main garage light to 80% and a workbench LED strip to 30%. The lights stay on for 10 minutes after the last detected motion, then turn off. No separate turn-off sensor — the turn-on sensor’s duration timer controls the off timing.
Configuration:
- Lights: garage ceiling light (master), workbench LED strip
- Control Buttons: garage wall switch (Toggle)
- Push button settings (Configure):
- Short Press — Enabled: On (default)
- Toggle Between: 0% and…: Value, 100% (default)
- Fade Time 0→100%: 250 ms (default)
- On Long Press — Fade Time 0→100%: 5 s (default)
- Minimum Value: 10% (default)
- Custom Actions: none configured
- Automatic Turn On sensors: garage motion sensor
- Turn-on action: Custom Actions
- Garage ceiling light: 80%
- Workbench LED strip: 30%
- Configure (Automatic Turn On):
- Motion sensor can only trigger lights in time interval...: Off (garage should respond any time)
- Limit by Brightness Sensor: none configured
- For a specified time: 10 minutes (visible because no automatic turn-off sensors are configured — this timer starts when all turn-on sensors become inactive)
- Automatic Turn Off sensors: none configured — the duration timer above handles turn-off instead
- Turn-off Delay: not visible — hidden because no automatic turn-off sensors are configured
- Override Automatic Control With a Button (on): Until turned off with a button
- Override Automatic Control With a Button (off): For a fixed time, 1 minute (default) — required because the on-override uses Until turned off with a button
Behavior: When motion is detected, the ceiling light turns on to 80% and the workbench strip turns on to 30% simultaneously. As long as the motion sensor keeps detecting movement, the lights stay on. Once the sensor goes inactive, the duration timer starts — after 10 minutes with no motion, the lights turn off. If you press the wall switch to turn lights on manually, the motion sensor is suppressed until you press the switch again to turn them off (no timeout — the override lasts until the opposite action). If you press the switch to turn the lights off, the sensor is suppressed for 1 minute.
When using Custom Actions, each light can have a different brightness. For a specified time replaces the turn-off delay — it starts when the turn-on sensors become inactive. If you later add Automatic Turn Off sensors, For a specified time disappears and Turn-off Delay takes over.
How the logic works
Evaluation order
The Light Controller processes events in a fixed order:
- Brightness sensor — update ambient light reading
- Push buttons — check if a button was pressed; if so, set override flag
- Automatic turn-on — check sensor triggers (skipped if override is active)
- Automatic turn-off — check sensor state and manage delay timers
Button actions take priority over automatic behavior. When you press a button, the override flag is set, and automatic systems pause until the override expires.
Push button override interaction
When a button is pressed (any type — regular or custom):
- The auto-turn-on expiration timer is cancelled
- The override flag is set
- Automatic turn-on is completely skipped on subsequent evaluations
- Automatic turn-off continues to track sensor state, but does not execute turn-off actions
When the override timer expires, automatic behavior resumes. If the auto-turn-off delay had already counted down during the override period, the turn-off may execute shortly after the override ends.
Automatic turn-on and turn-off interaction
When both auto-turn-on and auto-turn-off sensors are configured:
- Turn-on sensor activates — lights turn on
- Turn-on sensor deactivates — no immediate effect (turn-off sensors take over)
- Turn-off sensors become inactive — turn-off delay starts
- Delay expires — lights released to automatic control
When only auto-turn-on sensors are configured (no auto-turn-off sensors):
- Turn-on sensor activates — lights turn on
- Turn-on sensor deactivates — duration timer starts
- Timer expires — lights released to automatic control