Hey everyone, I wanted to share my journey with setting up motion-activated lights in my home. It’s been a bit of a learning curve, but I’m thrilled with how it turned out!
I started by experimenting with Home Assistant and Node-RED to create a simple automation. The goal was to have the lights turn on instantly when motion is detected and then turn off after a delay. At first, I tried using the built-in Motion Lighting integration, but it didn’t meet my expectations—it took several seconds for the lights to activate, which wasn’t ideal for my needs.
So, I decided to dive deeper into rule-based automation. I set up a flow in Node-RED where the motion sensor triggers the lights to turn on at full brightness during the day and at a lower brightness in the evening. The real challenge was ensuring the lights turned off after a set delay without any interference from other automations. After some trial and error, I figured out that adjusting the delay based on the state of an input_boolean switch allowed me to control the automation manually if needed.
Here’s a quick breakdown of what worked for me:
- Instant Activation: The lights now turn on within 1 second of detecting motion, which is perfect for quick adjustments when entering a room.
- Dynamic Brightness: The system automatically adjusts the light level based on the time of day, using an input_select to determine if it’s day or evening.
- Manual Override: By toggling the input_boolean switch, I can disable the automation temporarily, which is super handy during daylight hours when I don’t want the lights to interfere.
I also had to ensure that all my flows were pointing to the correct Home Assistant server instance, which I named “Home Assistant Real” to avoid confusion. Initially, I thought the issue was with the Edit Change node not referencing the server correctly, but it turned out to be a matter of fine-tuning the automation logic.
Reflecting on this project, I’m proud of how much I’ve learned about integrating different components in Home Assistant and Node-RED. It’s been a fantastic way to customize my smart home setup to meet my specific needs. If anyone has questions or wants to troubleshoot their own motion light setup, feel free to reach out—I’m happy to help!
Happy automating everyone! ![]()