Culvdave Posted February 12, 2018 Posted February 12, 2018 I have a program that family room perimeter lights switch on via motion sensor between sunset and midnight, stay on for 10 minutes then switch off. I'd like to add the exception that if family room overhead light is already on when motion sensor is switched on to ignore the command. How would I write that into the program. Thanks
lilyoyo1 Posted February 12, 2018 Posted February 12, 2018 At the very basic level simply add your existing program to a folder that says: If time is from sunset to 12am and status overhead lights are off Then allow this program to run
Culvdave Posted February 12, 2018 Author Posted February 12, 2018 I am pretty basic at this, that worked great, thanks.
Goose66 Posted February 12, 2018 Posted February 12, 2018 (edited) You could choose the two program option as well: One Trigger program that has the motion detector being switched on in the If statement and is enabled, and One Conditional program that has the other conditions (time range and status of overhead lights) in the If that is disabled. Same structure as using the folder as suggested above but extensively discussed here in these forums and in the Wiki. May be a more conventional approach than the folder. Edited February 12, 2018 by Goose66
ScottAvery Posted February 22, 2018 Posted February 22, 2018 This seems unnecessarily complicated and is wasting a node with an extra folder or program. If the perimeter lights are not the same as the overhead lights, then it can just be two conditions in one program. Status of overhead is not On and the sensor is switched on , then...
Goose66 Posted February 22, 2018 Posted February 22, 2018 1 hour ago, ScottAvery said: This seems unnecessarily complicated and is wasting a node with an extra folder or program. If the perimeter lights are not the same as the overhead lights, then it can just be two conditions in one program. Status of overhead is not On and the sensor is switched on , then... But then you run the risk of the wait timer being cancelled by the occurrence of one of the other conditions (the times in the time range, status of the overhead light changing) and therefore your perimeter lights never being turned off. This is the classic source of confusion with the ISY programming model (not to mention why the Else branch is practically worthless) and why so many use the two program approach as a matter of course to separate their trigger events from their conditional statements.
ScottAvery Posted February 23, 2018 Posted February 23, 2018 Fair point, I usually avoid it by not using conditions for status.
Recommended Posts