siegeld Posted November 3, 2007 Posted November 3, 2007 I have the following IF statement: If Control 'Foo' is switched On Or ( Status 'Bar' is Off And Control 'Bar' is switched Off ) Then ... The then does not seem to get executed in either case - be it Foo getting switched on or Bar being switched off. If I delete the entire Or part, the Foo switch does work. Quote
Mark Sanctuary Posted November 3, 2007 Posted November 3, 2007 I never have been able to think in "foo bar" speakage so lets see if I understand the logic. You want; if light1 is turned on, or if light2 is turned off and light2 is already off. This is an elseif type of configuration and should work, might be a bug. If Control 'Light1' is switched On Or ( Control 'Light2' is switched Off And Status 'Light2' is Off ) Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') Quote
siegeld Posted November 3, 2007 Author Posted November 3, 2007 Yes, what you describe is what I'm looking for. Quote
Mark Sanctuary Posted November 4, 2007 Posted November 4, 2007 Ok I was testing this on some light in our room and forgot to remove it. My wife started pushing buttons before bedtime and things when strange on her. Wife faction went down that was for sure. Deleted the program all is well again. Quote
siegeld Posted November 4, 2007 Author Posted November 4, 2007 Ah, so to be clear, it worked for you? I'll delete and recreate the program tomorrow to test again. Quote
Mark Sanctuary Posted November 4, 2007 Posted November 4, 2007 No it did not work, either there is a bug in the "Or ()" stuff or the code logic is not good because I always get "Else" part and not the "Then" part. Quote
Chris Jahn Posted November 5, 2007 Posted November 5, 2007 siegeld, Thank you for reporting this bug. It was a regression that it is now fixed for the next drop. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.