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.

When does the ELSE statement run?

Featured Replies

Posted

I expected the ELSE statement below to execute if the "Den Light" changes state to anything other than ON, but it's not.

If "Den Light" is turned off (Switched On is false), shouldn't the Else statement run? If not, what WOULD cause the ELSE statement to execute? Thanks!!

If

Control 'Den Light' is switched On

 

Then

Set 'Holiday Lighting' On

 

Else

Set 'Holiday Lighting' Off

CJVann

 

The Program will never run the Else clause. An If Control 'xxxxx' is switched On triggers the Program only when an On command is received from the device and the evaluation will always be True as coded.

 

Use If Status rather than If Control. If Status triggers the Program anytime the Status changes. When the Status change results in a True evaluation of the If the Then clause runs. When the Status change results in a False evaluation of the If the Else clause run.

 

If the Program should trigger whenever a command flows even when the Status does not change (pressing the On paddle twice for example) add an And Control ‘xxxxx’ is not switched Off to the existing If. The Program will trigger with an On command and an Off command. The If will be False with an Off command and run the Else clause.

 

Lee

  • Author

Thank you! I was expecting the statement to be evaluated anytime the device changed state, with "On" or "Off" deciding if the statement is True or False. (I'm actually trying to click a button on a RemoteLinc). Also, I've just discovered the RemoteLinc to have very unreliable communications here at my desk, further complicating troubleshooting. Thanks again, much appreciated!

Guest
This topic is now closed to further replies.

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.