Posted November 28, 20168 yr I would like to have some lights to come on 30 minutes before sunset but not before 5pm in the winter. What is the best way to program this so that it works all year long? i.e. in the summer 30 minutes before sunset could be as early as 3pm but I don't want lights to come on until 5pm. In the middle of summer sunset might be at 8pm so I would like the lights to come on at 7:30pm. Thoughts? Peter
November 28, 20168 yr May take multiple programs. My quick, brute-force approach, without much thought: If time is sunset -30 minutes then run second program (if path) else nothing second program (disabled) if time is from 5:00 until 11:59 <<<pick time after latest sunset in your area then turn lights on else enable third program third program (disabled) if time is 5:00 then turn lights on disable third program
November 28, 20168 yr You should be able to combine the conditions into one program...I think. As long as you use time frames. Other event triggers are never true unless they are the centre of attention, so will not work with AND. If ...from sunset -30 minutes ...to sunrise next day (thanks Stu) AND ...from 5:00 PM ...to sunrise next day then ...turn lights on ...wait 12 hours ... run else below else ... turn the lights Off Edited November 29, 20168 yr by larryllix
November 28, 20168 yr Don't forget to add "next day" to the first time condition or it will never be true
November 29, 20168 yr Author Funny how sometimes I get stuck on making complex OR logic when the simple AND logic is what is required. Many thanks for correcting my simple misdirection.
November 29, 20168 yr Funny how sometimes I get stuck on making complex OR logic when the simple AND logic is what is required. Many thanks for correcting my simple misdirection. Yeah the logic can get very complex and you can actually lose strands of hair on your head. I have some logic I stumble on every time I read it again but I know it works and I have worked it out with paper logic, but still it looks wrong. The triggers can stretch the strict boolean algebra also with their double purpose, conditional and trigger, from the same statement. oberkc's logic was my first thought also, but I was just lucky with a sudden idea. I'll brag once you prove it valid, but if it doesn't work...I was never here!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.