jfvalenti Posted November 3, 2009 Posted November 3, 2009 I'm new to ISY programming and was wondering if the following program will run correctly, or should I be using "And" in place of "Or"? Looking to create a "random look" On and Off of the device on Wed-Sat. If On Wed From 6:25:00PM To 6:44:00PM (same day) Or On Thu From 6:09:00PM To 6:48:00PM (same day) Or On Fri From 6:02:00PM To 6:35:00PM (same day) Or On Sat From 6:43:00PM To 7:15:00PM (same day) Then Set 'Foyer Key A (Lightpole)' On Else Set 'Foyer Key A (Lightpole)' Off Thanks!
Michel Kohanim Posted November 3, 2009 Posted November 3, 2009 Hi jfvalenti, Why don't you use the Wait function with the Random attribute. It seems that the days are Wed, Thu, Fri, and Sat. So, make your condition as follows If On Wed Time is 6:00:00PM Or On Thu Time is 6:00:00PM Or On Fri Time is 6:00:00PM Or On Sat Time is 6:00:00PM Then Wait 0 hours 45 minutes 00 seconds Random Do whatever needs to be done So, the random will pick a number between 0 minutes (6:00 PM) up to 45 minutes (6:45 PM). With kind regards, Michel I'm new to ISY programming and was wondering if the following program will run correctly, or should I be using "And" in place of "Or"? Looking to create a "random look" On and Off of the device on Wed-Sat. If On Wed From 6:25:00PM To 6:44:00PM (same day) Or On Thu From 6:09:00PM To 6:48:00PM (same day) Or On Fri From 6:02:00PM To 6:35:00PM (same day) Or On Sat From 6:43:00PM To 7:15:00PM (same day) Then Set 'Foyer Key A (Lightpole)' On Else Set 'Foyer Key A (Lightpole)' Off Thanks!
Recommended Posts