How to Set Up Dim Motion Lighting at Night in Home Assistant

A bright hallway is useful when you’re bringing in groceries. It’s less welcome when you’re walking to the bathroom in the middle of the night. In Home Gadget Geeks 472, Mike Wieger described a simple plan: use a hallway motion sensor to bring the lights up to 25 percent overnight. The percentage was his starting point. You can tune yours once you see the light at night.

Start with the sensor and light

Use a motion entity that reliably changes from clear to detected and a light entity that supports brightness. Before building the rule, check how long the sensor stays on after the last movement. That built-in delay affects when your lights can turn off. Try the light at your intended brightness from Home Assistant so you know what the device actually does.

Turn the light on when motion starts

In the automation editor, use a state trigger for the motion sensor changing from off to on. Add a time condition for the overnight window, such as 10 p.m. to 6 a.m. Add a second condition requiring the light to be off if you want to preserve a brightness someone already set. Use the light turn-on action and set the brightness to 25 percent as a first test. Home Assistant time conditions can span midnight when both endpoints are specified.

Decide how the light turns off

For a hallway dedicated to this routine, use a separate state trigger when motion clears and stays clear for a short interval. Give the automation an explicit target and consider what should happen to lights someone turned on manually. If manual operation matters, use an ownership helper or a dedicated night light before enabling automatic off. A state trigger’s waiting period resets on a restart or automation reload, so test what happens to an already-lit hallway after a restart.

Test with real traffic

Walk through after the start time, retrigger motion before the light goes out, and check the same route in daylight. Try manually setting the light bright and make sure the night routine respects it. If a routine misses a detection, look at the sensor history first, then open the automation trace to see whether a condition blocked it.

FAQ

Can I use a regular on/off switch?

Yes for motion-controlled on and off. Dimming requires a compatible dimmer or light.

Will this dim a light I already turned on?

An off-state condition prevents the turn-on routine from changing an already-lit hallway.

Why does the light stay on longer than my timer?

The sensor may stay in the detected state for its own cooldown before the automation’s clear-state timer begins.

Read the original HGG472 notes for Mike’s planned hallway and kitchen setup.

Resources

Automation triggers

Turn on light

Troubleshooting automations