Integrating Motion Sensors and Contact Switches for Garage Lighting Automation

Hello fellow smart home enthusiasts! I’ve been diving into creating a more efficient and automated garage lighting system, and I wanted to share my journey and seek some advice along the way. :rocket:

I’ve set up motion sensors and a contact switch to trigger my garage lights. The idea is to have the lights turn on when motion is detected and stay on for a certain period, even if the door is opened or closed. However, I’ve encountered a challenge: I can’t seem to add both the motion sensors and the contact switch to the same automation. :confused:

Here’s what I’m aiming for: When someone enters the garage, the lights should automatically turn on. If the door is opened while the lights are on, they should stay on for a bit longer to ensure visibility. If the door is closed while the lights are off, they should remain off. It sounds straightforward, but getting the automation to recognize both inputs has been tricky. Any tips or tricks would be greatly appreciated! :+1:

I’ve tried breaking down the automation into smaller parts and using different triggers, but nothing seems to stick. Maybe there’s a setting I’m missing or a different approach altogether. I’m open to suggestions and happy to share more details if needed. Let’s brainstorm together! :bulb:

Thanks for your insights and support. Looking forward to hearing from you all! :raised_hands: