Bathroom Automation System (mmWave Required)
I wanted to share my bathroom lighting setup designed specifically for mmWave presence sensors.
The goal was to handle real-world issues like stillness, false negatives, and manual overrides—things that typical motion-based automations struggle with.
This system includes:
- Entry + hold + exit logic using presence (no timers)
- A safety net to ensure lights turn off if presence fails
- Manual override protection (turns lights back off if someone turns them on while the room is empty)
It’s been very reliable in practice, especially for situations like sitting still or being in the shower.
Requirements:
- mmWave presence sensor (FP300, LD2410, LD2450)
- Light or switch with instant state updates (I use a Leviton Matter switch)
- Door sensor (used for safety net logic)
This is designed for mmWave sensors. It will not work properly with PIR motion sensors.
Core Automation (Entry / Hold / Exit)
blueprint:
name: Bathroom Presence (Entry / Hold / Exit - mmWave)
description: >
Turns lights on when presence is detected and keeps them on while occupied.
Turns lights off immediately when presence is lost.
Designed for mmWave sensors (handles stillness). Not for PIR sensors.
domain: automation
input:
presence_sensor:
name: Presence Sensor (mmWave)
selector:
entity:
domain: binary_sensor
illuminance_sensor:
name: Illuminance Sensor
selector:
entity:
domain: sensor
light_target:
name: Lights
selector:
target:
entity:
domain: light
lux_threshold:
name: Lux Threshold
default: 35
selector:
number:
min: 0
max: 200
step: 1
mode: slider
mode: restart
trigger:
- platform: state
entity_id: !input presence_sensor
to: "on"
condition:
- condition: numeric_state
entity_id: !input illuminance_sensor
below: !input lux_threshold
action:
- service: light.turn_on
target: !input light_target
- wait_for_trigger:
- platform: state
entity_id: !input presence_sensor
to: "off"
- service: light.turn_off
target: !input light_target
Safety Net
blueprint:
name: Bathroom Safety Net (Auto-Off)
description: >
Turns lights off when presence is lost and the door is open.
Acts as a fail-safe in case presence detection misses an exit.
Designed for mmWave setups.
domain: automation
input:
presence_sensor:
name: Presence Sensor
selector:
entity:
domain: binary_sensor
door_sensor:
name: Door Sensor
description: Should be ON when door is open
selector:
entity:
domain: binary_sensor
light_target:
name: Lights
selector:
target:
entity:
domain: light
mode: single
trigger:
- platform: state
entity_id: !input presence_sensor
to: "off"
condition:
- condition: state
entity_id: !input door_sensor
state: "on"
action:
- service: light.turn_off
target: !input light_target
Shower Lock
blueprint:
name: Bathroom Shower Lock (Door + Presence Hold)
description: >
Keeps lights on while the bathroom door is closed and presence is detected.
Prevents lights from turning off during showers or extended stillness.
Releases when the door opens or presence is lost.
domain: automation
input:
presence_sensor:
name: Presence Sensor (mmWave)
selector:
entity:
domain: binary_sensor
door_sensor:
name: Door Sensor
description: OFF = closed, ON = open
selector:
entity:
domain: binary_sensor
light_target:
name: Lights
selector:
target:
entity:
domain: light
exit_delay:
name: Exit Delay (seconds)
default: 5
selector:
number:
min: 0
max: 30
step: 1
mode: slider
mode: single
trigger:
- platform: state
entity_id: !input door_sensor
to: "off"
condition:
- condition: state
entity_id: !input presence_sensor
state: "on"
action:
- delay:
seconds: !input exit_delay
- if:
- condition: state
entity_id: !input presence_sensor
state: "off"
then:
- service: light.turn_off
target: !input light_target
- stop: Occupancy lost
- wait_for_trigger:
- platform: state
entity_id: !input door_sensor
to: "on"
- service: light.turn_off
target: !input light_target
Manual Override Protection
blueprint:
name: Bathroom Manual Override Protection
description: >
Turns lights back off if they are manually turned on while no presence is detected.
domain: automation
input:
presence_sensor:
name: Presence Sensor
selector:
entity:
domain: binary_sensor
light_entity:
name: Light
selector:
entity:
domain: light
off_delay:
name: Off Delay (seconds)
default: 3
selector:
number:
min: 0
max: 30
step: 1
mode: slider
mode: restart
trigger:
- platform: state
entity_id: !input light_entity
from: "off"
to: "on"
condition:
- condition: state
entity_id: !input presence_sensor
state: "off"
action:
- delay:
seconds: !input off_delay
- service: light.turn_off
target:
entity_id: !input light_entity
Open to feedback or improvements.