Automating Bathroom Lights with Motion Sensors

Hey everyone, I’ve been diving into automating my bathroom lights and thought I’d share my experience and a question or two. I’ve got two dimmers and a motion sensor set up, and I’m trying to create a smooth morning routine where the lights gradually brighten when motion is detected and then turn off after 30 minutes of inactivity.

I’ve created a piston for this, but I’m running into two issues. First, if the motion sensor gets triggered again within that 30-minute window, the piston restarts, causing the lights to flicker and dim repeatedly. It’s a bit annoying, especially when I’m just moving around the bathroom. Second, I’d love the timer to reset if motion is detected again, so the lights don’t turn off prematurely.

I’ve tried adjusting the timing and even looked into different piston configurations, but nothing seems to stick. I wonder if there’s a way to make the timer more flexible or if I need to tweak the motion sensor settings. Any advice or tips from the community would be super helpful!

On a positive note, I’ve really enjoyed how customizable the system is. It’s been a great learning experience, and I’m excited to see how I can refine this setup further. Thanks in advance for any insights!