Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OR logic appears broken in IF statements

Featured Replies

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.

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

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:

  • Author

Ah, so to be clear, it worked for you? I'll delete and recreate the program tomorrow to test again.

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.