born2dive Posted June 29, 2015 Posted June 29, 2015 I understand that program state by default is "False" and when its condition is being evaluated or the program is running the state changes to "True". I have a couple of simple programs that I created to automate turning lights on and off. When the first one executes to turn the lights on its state turns to "True" while running and then "False" when it finishes (most of my other programs do that). Code below: If Status 'Garage / Garage Left-Sensor' is Off Or Status 'Garage / Garage Right-Sensor' is Off Then Set 'Garage / Garage Lights' On $GarageOpen = 1 Run Program 'Garage LightsOff on Close' (If) Else - No Actions - (To add one, press 'Action') I have a second program that turn the lights off after a few minutes, its state is "True" while running and stays "True" after it finishes. Code below: If $GarageOpen is 1 Then Wait 10 minutes Set 'Garage / Garage Lights' Off $GarageOpen = 0 Else - No Actions - (To add one, press 'Action') Any advice or more info on how to control program state? Is there a way to force or set program state? Thanks
G W Posted June 29, 2015 Posted June 29, 2015 I think you have a misunderstanding of what program state means. Sent from my SM-N900P using Tapatalk
born2dive Posted June 29, 2015 Author Posted June 29, 2015 I think you have a misunderstanding of what program state means. Sent from my SM-N900P using Tapatalk Thanks...I agree, which is why I am asking...can you point me somewhere where I can read up?
G W Posted June 29, 2015 Posted June 29, 2015 Thanks...I agree, which is why I am asking...can you point me somewhere where I can read up?Start here. http://wiki.universal-devices.com/index.php?title=Main_Page Sent from my SM-N900P using Tapatalk What is it you want to do? Sent from my SM-N900P using Tapatalk
oberkc Posted June 29, 2015 Posted June 29, 2015 Program state reflects results of condition when last evaluated. If a program last ran three days ago, and executed the THEN path, the program status will be true and remain true until it runs again.
Recommended Posts