rick.curl Posted October 20, 2015 Posted October 20, 2015 I've got a bunch of programs and they're all running fine, but I'm trying to add one that should be simple but I can't get it to work. Here's what I'm trying to do: On Mondays I leave the house at 5:30 AM, and on Tuesday, Wednesday, and Thursday I leave at 6:00. If it's dark when I leave I would like the side yard light to be on for 15 minutes. Here's what I've got at the moment: If From Sunset To Sunrise (next day) And On Tue, Wed, Thu Time is 6:00:00AM Or On Mon Time is 5:30:00AM Then In Scene 'Outside / Side Yard' Set 'Outside / Side Yard' 100% (on Level) Wait 15 minutes In Scene 'Outside / Side Yard' Set 'Outside / Side Yard' 0% (on Level) Else -No actions I tried changing "Sunrise" to "same day" but it is still never running. This has got to be something ridiculously simple that I'm overlooking. What is it? Thanks! -Rick
stusviews Posted October 20, 2015 Posted October 20, 2015 There's no need for the Sunset-Sunrise condition.
oberkc Posted October 20, 2015 Posted October 20, 2015 I assume you are using the sunrise and sunset conditions as "dark", correct? I suspect you have some logical priority issues here. This can be corrected with a couple of parenthesis. I also suspect your THEN clause is incorrect. Rather than setting the responder levels, simply turn the scene on. If From Sunset To Sunrise (next day) And ( On Tue, Wed, Thu Time is 6:00:00AM Or On Mon Time is 5:30:00AM ) Then Set scene 'Outside / Side Yard' ON Wait 15 minutes Set Scene 'Outside / Side Yard' OFFElse -No actions
larryllix Posted October 20, 2015 Posted October 20, 2015 (edited) Try this. The parenthesis supercedes the AND which has a higher priority than the OR. It should have worked on Mon at 5:30 regardless If From Sunset To Sunrise (next day) And ( On Tue, Wed, Thu Time is 6:00:00AM Or On Mon Time is 5:30:00AM )Then In Scene 'Outside / Side Yard' Set 'Outside / Side Yard' 100% (on Level) <--- set scene ON not modify it Wait 15 minutes In Scene 'Outside / Side Yard' Set 'Outside / Side Yard' 0% (on Level) <---set scene Off, not modify itElse -No actions EDIT: OberKC is correct.I missed the then problem. Modifying scenes does not activate them. Edited October 20, 2015 by larryllix
stusviews Posted October 20, 2015 Posted October 20, 2015 oberck is correct. The scene should be set to On of Off.
rick.curl Posted October 20, 2015 Author Posted October 20, 2015 Thanks! I didn't know about parenthesis. I'll read up on it. I modified my program as suggested in post#4 above. I'll report back when I find out if it works tomorrow morning. Appreciate the help! -Rick
Recommended Posts