DIY Sunset-Led Light Automation Project

Hey everyone, I wanted to share a fun DIY project I recently completed. After spending some time researching and experimenting, I managed to set up an automated LED light system that turns on and off based on the sunset. The best part? I can adjust the timing and duration directly through the GUI, which makes it super convenient.

Here’s a quick overview of how I did it:

  1. Setup: I started by setting up two input sliders in my config file. One slider controls the minutes after sunset when the lights should turn on, and the other controls how long the lights should stay on. I also created some template sensors to display the exact on and off times.

  2. Automation: I set up two automations—one to turn the lights on and another to turn them off. Both are triggered every minute, but they only activate when the current time matches the calculated on or off times from the sensors.

  3. Testing: It took a bit of tweaking, but once everything was set up, it worked like a charm! The lights now turn on and off exactly when I want them to, and I can easily adjust the timing from my phone or computer.

I’d love to hear if anyone else has tried something similar or has any tips to make it even better. Happy tinkering! :rocket: