Efficient Lighting Automation with Motion Sensors and Door Sensors

I recently set up an automation in my bedroom that I’m really happy with, and I thought I’d share it in case anyone else is looking to optimize their lighting setup. The goal was to ensure that the lights turn off automatically when the room is unoccupied, but also to prevent the room from being pitch black when I or my partner walk back in.

Here’s how I approached it: I have a motion sensor in the bedroom and a door sensor on the bathroom door. The idea is that if there’s no motion in the bedroom AND the bathroom door has been open for a certain amount of time, the lights should turn off. But if someone walks back into the bedroom before both conditions are met, the lights stay on.

I used a wait_template action with a 2-minute delay for both the motion sensor and the door sensor. This way, if the motion stops and the door remains open for 2 minutes, the lights turn off. It’s been working perfectly for me, and I love how it balances energy efficiency with convenience.

If anyone has tips on fine-tuning this further or alternative approaches, I’d love to hear them! :rocket: