weepee Posted November 8, 2008 Share Posted November 8, 2008 I need advise with night time programming in scheduler. I'm trying to turn on a hall light from the mudroom when i get home and it's dark. My script looks like thiswhen mudroom->2-button keypad button 1 is pressed >turn on mudroom -> light ? if time is night time -> turn on hall lightwhen i press the button anytime of day both lights come on. What am i doing wrong? Link to comment Share on other sites More sharing options...
jbs Posted November 9, 2008 Share Posted November 9, 2008 It would be helpful if you can post a screenshot of your code, that makes it easier for us to understand what's going on. See my post here:http://www.c4forums.com/viewtopic.php?pid=6077#p6077for a great screen capture program.In this case, I can't tell from the way you've typed it, but the behavior makes it sound as though the third line is not embedded underneath the second conditional line. If it does not show up indented, then you need to click on the third line and drop it onto the question mark of the line above. That's how Composer interprets that it should only execute their third line if the second line is true.Can you confirm whether that third line is indented under the second? >turn on mudroom -> light ? if time is night time -> turn on hall light--Jason Link to comment Share on other sites More sharing options...
henniae Posted November 9, 2008 Share Posted November 9, 2008 Also check to see if you have your Lat and Long set. If you don't the system will not be able to tell sunrise and sunset times which are used to determine if it is day time or night time. Link to comment Share on other sites More sharing options...
weepee Posted November 9, 2008 Author Share Posted November 9, 2008 Thanks Jason That was the problem. I'm still learning and appreciate yours and everybody's help here on the forum Link to comment Share on other sites More sharing options...
neil12011 Posted November 10, 2008 Share Posted November 10, 2008 that's def a newbie mistake (which we ALL have made). Jason hit it on the head with the indented ref. Good call. Link to comment Share on other sites More sharing options...
jbs Posted November 10, 2008 Share Posted November 10, 2008 I even continue to make it. The trick, I guess, is that you have to "drop" the new item onto the question mark. If you drop it onto the line of text after the question mark it just moves things around, doesn't indent. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.