siegeld Posted November 3, 2007 Share 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. Link to comment
Mark Sanctuary Posted November 3, 2007 Share 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') Link to comment
siegeld Posted November 3, 2007 Author Share Posted November 3, 2007 Yes, what you describe is what I'm looking for. Link to comment
Mark Sanctuary Posted November 4, 2007 Share 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. Link to comment
siegeld Posted November 4, 2007 Author Share Posted November 4, 2007 Ah, so to be clear, it worked for you? I'll delete and recreate the program tomorrow to test again. Link to comment
Mark Sanctuary Posted November 4, 2007 Share 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. Link to comment
Chris Jahn Posted November 5, 2007 Share Posted November 5, 2007 siegeld, Thank you for reporting this bug. It was a regression that it is now fixed for the next drop. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.