saflight Posted November 5, 2011 Posted November 5, 2011 What is wrong with this program? The Rear BR can light comes on if the conditions are affirmed. However, it does not turn off. If Time is Sunset - 15 minutes And ( Status 'Fam Rm Key - Ceiling' is Off And Status 'Fam Rm Table' is Off And Status 'Kitchen Ceiling Keypad - A' is Off ) And Status 'Rear Br Can' < 34% Then Set 'Rear Br Can' 70% Wait 1 hour and 40 minutes Set 'Rear Br Can' Off Else - No Actions - (To add one, press 'Action')
oberkc Posted November 5, 2011 Posted November 5, 2011 The first "then" statement changes the Rear BR Can lights to 70%, which triggers an evaluation of the "if" condition, which is now false. This happens before the program "then" statement is completed, which means that the Rear BR Can lights are never turned off.
polexian Posted November 5, 2011 Posted November 5, 2011 When you use the wait command then the next time the program runs it re-evaluates the if statement and it is false so it doesn't do the next part. Instead of doing a wait you should call a different program and not have anything in the if and in the then column put your wait and the the light action. Sent from my iPhone using Tapatalk
Recommended Posts