Outdoor Lighting: Patio, Driveway, Entrance, Garden, Motion Sensors, and Night Mode
Outdoor Lighting: Patio, Driveway, Entrance, Garden, Motion Sensors, and Night Mode
From Module 20 you already know dimming and LED strips indoors. Outside, you add dusk, foot traffic from the sidewalk, and neighbors whose bedroom window a 2 a.m. floodlight can light up. This is the first low-risk zone from the map: a good testing ground for the read → suggest → control model from Lesson 1.
Today you're building lighting controlled by dusk, a PIR sensor, and a night mode, with a clear split: functional light (entrance, driveway) needs to be reliable, decorative light (garden, patio) can be more experimental.
Budget around 85 to 95 minutes. From here on I'll shorten Home Assistant to HA.
The core rule of this module
Outdoors, automation has to be more resilient than it is indoors.
Read and diagnose state first.
Then manual control and a Plan B.
Only then automation.
A Problem from Real Life: The PIR That Reacts to a Cat and the Neighbor Walking By
A motion sensor at the entrance set to maximum sensitivity floods the yard with light at 3 a.m. every time a neighbor's cat crosses the lawn, and along the way reacts to every pedestrian on the sidewalk 13 feet from the sensor. After a week, an exhausted household member disables the automation entirely: you lose the safety feature you actually wanted.
Second scenario: an LED fixture rated "IP65" starts flickering after one season, because the cheap dimming driver inside the fixture wasn't designed to run in below-freezing temperatures (see Lesson 2: IP says nothing about temperature range).
Functional vs. Decorative: Different Requirements
| Trait | Functional (entrance, driveway, steps) | Decorative (garden, patio, facade) |
|---|---|---|
| Priority | Safe footing, orientation | Mood, aesthetics |
| Reliability | Has to work every single time | A miss is acceptable |
| Plan B without HA | Required: a manual switch by the door | Optional |
| Default rule if it fails | On, or controlled by a local dusk sensor independent of HA | Off is acceptable |
What's at Risk
An overly sensitive PIR: cats, leaves blowing, pedestrians on the sidewalk trigger dozens of false activations a day.
Functional light dependent solely on HA: a network outage or an HA restart leaves the entrance dark in the middle of the night.
A floodlight shining into a neighbor's window: too wide a detection angle, or too bright a light aimed the wrong way.
No night mode: full brightness at 3 a.m. instead of a dimmed, orientation-level glow.
Outdoor Lighting Helpers
input_boolean:
night_mode_outdoor:
name: "Outdoor lighting night mode"
icon: mdi:weather-night
initial: false
input_number:
functional_light_day_pct:
name: "Functional light brightness (day)"
min: 30
max: 100
step: 5
initial: 100
unit_of_measurement: "%"
functional_light_night_pct:
name: "Functional light brightness (night, e.g. 11pm-6am)"
min: 5
max: 60
step: 5
initial: 25
unit_of_measurement: "%"
pir_garden_timeout_s:
name: "Time-out after motion (garden)"
min: 30
max: 600
step: 30
initial: 180
unit_of_measurement: "s"
night_mode_outdoor dims functional lighting during quiet hours instead of turning it off: the entrance and driveway stay visible without being blinding. pir_garden_timeout_s is the value you'll tune: too short and it flickers if someone lingers, too long and it wastes energy and lights up a neighbor's windows for no reason.
Automation 1: Entrance Light on Dusk and Motion
A sun.sun trigger tied to dropping below the horizon is more reliable than a fixed clock time: it accounts for the season automatically. The PIR only gets added into the mix once it's already dark: during the day, there's no reason to react to motion with light.
automation:
- alias: "Outdoor: entrance light on motion after dusk"
description: "Turns on entrance light when the PIR detects motion and it's dark"
mode: restart
triggers:
- trigger: state
entity_id: binary_sensor.entrance_pir
to: "on"
conditions:
- condition: state
entity_id: input_boolean.outdoor_automation_enabled
state: "on"
- condition: sun
after: sunset
before: sunrise
- condition: state
entity_id: input_select.garden_mode
state: "Service"
# inverted below on purpose: a "not" condition against Service mode
actions:
- if:
- condition: state
entity_id: input_boolean.night_mode_outdoor
state: "on"
then:
- action: light.turn_on
target:
entity_id: light.entrance_floodlight
data:
brightness_pct: "{{ states('input_number.functional_light_night_pct') | int(25) }}"
else:
- action: light.turn_on
target:
entity_id: light.entrance_floodlight
data:
brightness_pct: "{{ states('input_number.functional_light_day_pct') | int(100) }}"
- delay:
seconds: "{{ states('input_number.pir_garden_timeout_s') | int(180) }}"
- condition: state
entity_id: binary_sensor.entrance_pir
state: "off"
- action: light.turn_off
target:
entity_id: light.entrance_floodlight
The Service-mode condition above is broken on purpose
The "state: Service" condition with no negation would only block the light when the mode is actually set to Service, which is the opposite of what's intended. Fix it into a condition: not block wrapping the Service-state check before you enable this automation: it's a deliberate bug for you to catch in this lesson's practical task.
Automation 2: Decorative Garden and Patio Lighting
Decorative light has lower reliability requirements: it can run off a manual scene or a simple dusk-to-a-set-time schedule, with no PIR involved.
automation:
- alias: "Outdoor: patio and garden ON at dusk"
description: "Turns on decorative patio and garden lighting at sunset"
mode: single
triggers:
- trigger: sun
event: sunset
offset: "-00:15:00"
conditions:
- condition: state
entity_id: input_boolean.outdoor_automation_enabled
state: "on"
- condition: not
conditions:
- condition: state
entity_id: input_select.garden_mode
state: "Service"
actions:
- action: light.turn_on
target:
entity_id:
- light.patio_led
- light.garden_path
data:
brightness_pct: 70
- alias: "Outdoor: patio and garden OFF at 11:30pm"
description: "Turns off decorative lighting for the night"
mode: single
triggers:
- trigger: time
at: "23:30:00"
conditions:
- condition: not
conditions:
- condition: state
entity_id: input_select.garden_mode
state: "Vacation"
actions:
- action: light.turn_off
target:
entity_id:
- light.patio_led
- light.garden_path
In Vacation mode, the 11:30pm shutoff is deliberately skipped: you want the house to look lived-in, so decorative lights can stay on longer or follow a separate presence-simulation schedule (you'll build on this in the security module and again in Lesson 13 of this module).
Tuning PIR Sensitivity: Step by Step
1. Start at the lowest physical sensitivity on the sensor (a potentiometer, or a setting in the integration): confirm it still catches a person at the range you actually want it to react at.
2. Adjust the mounting angle so detection covers the path to your door, not the public sidewalk 13 ft farther out.
3. If the PIR still catches street traffic, consider a model with an adjustable detection mask, or a physical shield over part of the lens.
4. Watch the logbook for three days: count activations and compare against the actual foot traffic you remember.
Plan B: A Local Dusk Sensor Independent of HA
The entrance can't depend solely on HA
For functional entrance lighting, also consider a simple dusk-sensing photocell wired into the circuit, independent of Home Assistant, as a physical Plan B: when HA is down, someone can still see the path to the door. The HA automation then only adds a brightness boost on motion; it isn't the only source of light.
Specific Motion Sensor Models for Outdoor Lighting
For functional lighting (entrance, driveway), the most commonly chosen sensors are outdoor-rated PIR units from Aqara, Sonoff, and Shelly, paired with outlets or relays rated at least IP44. mmWave sensors are showing up more often too, more accurate at detecting stationary or slow motion (a person standing at the door, say), but more prone to false alarms from moving branches or insects in the housing if sensitivity isn't calibrated carefully.
Shelly Motion / Shelly BLU Motion: a compact motion sensor; the BLU version runs over Bluetooth through a Shelly gateway, a good fit for spots with no Wi-Fi coverage
Aqara Motion Sensor P1 / outdoor: adjustable sensitivity and detection timing from within the integration, handy for the tuning described in this lesson
mmWave sensors (Tuya/Zigbee mmWave lines, for instance): also detect the absence of motion (presence), not just motion itself, but need more careful calibration of the detection zone
Smart Outdoor Bulbs vs. a Plain Bulb in a Smart Outlet
| Approach | Pros | Cons |
|---|---|---|
| A dedicated outdoor smart bulb (IP44+) | full color and brightness control, native Zigbee/Wi-Fi integration | higher cost, limited choice of fixtures that accept it |
| A plain bulb plus a smart outdoor outlet/relay | cheaper, works with any bulb, easy to swap | on/off only, no dimming or color unless the outlet itself supports it |
For most functional lighting (entrance, driveway), the simpler, cheaper outdoor relay approach is entirely sufficient, since motion and dusk detection is handled by separate sensors, not the bulb itself. Bulbs with full color control mostly earn their keep on decorative garden and patio lighting.
Holiday and Seasonal Scenes: Beyond the Standard Automations
Beyond the two core automations in this lesson (functional and decorative light), it's worth considering separate seasonal scenes: brighter, warmer lighting for the winter holidays, cooler and more subdued for everyday. A seasonal scene in Home Assistant is simply a saved set of light-entity states, switched manually or automatically based on a calendar date, with no need to touch the main automations from this lesson.
Light Level (Lux) vs. Actual Feelings of Safety
Research on outdoor lighting shows that excessively bright, point-source light can actually create deeper, darker shadows in the surroundings than moderate, evenly distributed lighting, paradoxically lowering the real sense of safety despite higher brightness at one spot. When planning functional lighting, it's worth thinking in terms of even coverage across paths and entrances, rather than maximizing the brightness of a single fixture by the door.
Solar Lighting as a Supplement to Grid Power
In spots where running power is costly or impractical (a far corner of the garden, a path along the fence line), solar lights with a built-in dusk sensor make a sensible complement to the system in this lesson, though they usually run autonomously, outside Home Assistant's control, unless you pick a model with a Zigbee or Wi-Fi module. For most decorative uses in far-off parts of the garden, a solar light's simple autonomy is enough, and no integration is needed.
Integrating Outdoor Lighting with Your Alarm System
Beyond the dusk- and motion-based automations described in this lesson, outdoor lighting can play an additional deterrent role, tied into the alarm system from Module 18: with the alarm armed and unauthorized motion detected, every outdoor light can snap on at full brightness at once, instead of running in the gentler, standard functional mode. That response, though rarely triggered, is a simple extension of the existing lighting automation with one extra condition checking alarm state.
Dusk Sensors: Built-In vs. Standalone
Many smart bulbs and relays have a built-in dusk-detection feature based on their own light sensor, but those built-in sensors can be inaccurate if the device is partly shaded by its fixture or a tree. A standalone, dedicated dusk sensor, mounted somewhere with full exposure to natural light, gives a more accurate and reliable signal for a central automation to use than relying on the sensor built into every individual bulb.
Light Pollution and Its Effect on Neighbors
Intense outdoor lighting, especially aimed horizontally instead of downward, can bother neighbors and contribute to what's known as light pollution, visible as a brightened night sky in urban areas. Good outdoor lighting practice, like choosing full-cutoff fixtures that direct light downward and avoiding more wattage than you actually need, is both a courtesy to neighbors and a real energy saving.
How to Test This Lesson
1. Find and fix the broken condition in Automation 1 (see the warning above) before you enable it.
2. Test the timeout: step into the PIR's range, then step away, and confirm the light shuts off after the set time.
3. Turn on night mode and confirm brightness actually drops, not just a color change.
4. Count false triggers over three days and re-tune PIR sensitivity.
Common Mistakes
Maximum PIR sensitivity from day one: false alarms discourage you before you get to tune it.
No night mode: full-brightness floodlight at 3 a.m. wakes household members and neighbors alike.
Entrance light with no Plan B: an HA outage leaves the front door unlit.
Practical Task
☐ Fix the broken Service-mode condition in Automation 1.
☐ Deploy functional light (PIR + dusk) and decorative light (schedule) separately.
☐ Tune PIR sensitivity over three days of watching the logbook.
☐ Confirm your Plan B for entrance light without HA.
Key Takeaways
Functional and decorative carry different reliability requirements.
Tune PIR sensitivity gradually, low to high, while watching the logbook.
Night mode dims functional lighting, it doesn't switch it off.
What's Next
Next lesson: The Driveway Gate in Home Assistant: Control, Reed Sensors, Open-State, and Safety. We move on to the first high-risk zone from the map.