Culvdave Posted February 12, 2018 Share 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 Link to comment
lilyoyo1 Posted February 12, 2018 Share 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 Link to comment
Culvdave Posted February 12, 2018 Author Share Posted February 12, 2018 I am pretty basic at this, that worked great, thanks. Link to comment
Goose66 Posted February 12, 2018 Share Posted February 12, 2018 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. Link to comment
ScottAvery Posted February 22, 2018 Share 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... Link to comment
Goose66 Posted February 22, 2018 Share 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. Link to comment
ScottAvery Posted February 23, 2018 Share Posted February 23, 2018 Fair point, I usually avoid it by not using conditions for status. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.