• ilinamorato@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    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
      link
      fedilink
      arrow-up
      4
      ·
      1 day ago

      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.

      • ilinamorato@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        8 hours ago

        (Side note, I just realized I said the times slightly wrong. We actually wanted it on at 6:30 and off 15 minutes before sunrise.)

        Yeah, I had it turning off before sunrise just fine. The problem is that we didn’t want to turn them on until 6:30, but on the longest day of the year, sunrise actually happens at 6:14, which means that the lights would get the signal to turn off before they got the signal to turn on, which would mean that the lights would stay on all day until the night automation turned them back off again at 10pm. Which…probably doesn’t make a difference, but it would bug my totally-not-neurodivergent brain.

        Anyway, I don’t use Home Assistant, but that’s probably the one I’ll choose the next time I move.

      • AtariDump@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        20 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.

      • ilinamorato@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        8 hours ago

        The porch lights in question are actually string lights, and I just assumed that the power outlet they’re plugged into was too deep on the porch for a light sensor to be reliable. I could definitely be wrong, though.