Jump to content

OR logic appears broken in IF statements


siegeld

Recommended Posts

Posted

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.

Posted

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')

Posted

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. :lol:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...