this post was submitted on 02 Dec 2025
1295 points (98.9% liked)
Programmer Humor
27599 readers
2914 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I spent way more time than I care to think about figuring out how to get my porch lights to come on at 7am and turn off 10 minutes before sunrise without breaking when sunrise happened before 7am. I tried some serious Rube Goldberg nonsense in multiple iterations, until finally I decided to just add another "turn off the lights" at 9am every day. Most of the time it doesn't do anything because the lights are already off, but on DST day it accomplishes my goal of making sure they don't run all day, since 9am is always after sunrise.
Light sensor trigger?
If you're using home assistant there is a "sun" integration.
My lights turn on 30 minutes before sunset and turn off 30 minutes after sunrise.
My wife didn't want them turning on and off at the same time every day because observers could see the pattern... at least this way it's a little more hidden.