this post was submitted on 02 Dec 2025
1535 points (98.5% liked)

Programmer Humor

27601 readers
2877 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

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] ilinamorato@lemmy.world 3 points 13 hours ago* (last edited 13 hours ago) (2 children)

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.

[–] couch1potato@lemmy.dbzer0.com 3 points 11 hours ago (1 children)

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.

[–] AtariDump@lemmy.world 1 points 7 hours ago

Yep. You can also use the sun’s position in the sky as well; I had one of the AIs write up the YAML.

[–] Appoxo@lemmy.dbzer0.com 1 points 10 hours ago

Light sensor trigger?