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.

Double IF question

Featured Replies

Posted

I would like to check control status and after 2 min wait recheck status.

If condition is still true execute THEN. I would appreciate ideas.

 

It does not seem to me that I can do it with one program.

It may work to have 2 programs. First one checking condition, if condition is TRUE waiting 2 min and recalling second program with IF checking staus and executing THEN. I think that second program should be diabled.

 

Thanks for the help Walter

Unless I'm missing something, I think this is easier than you might think.

 

If you check for a condition, then wait 2 minutes, the program will automatically become false if that condition is no longer true during that 2 minute wait.

 

I do something similar with my office thermostat:

 

If
       Status  'OfficeThermostat' is Mode Cool
   And Program 'Office Work Hours' is False
   And Program 'Office Light Status' is False
   And Status  'OfficeThermostat' < 85° (Setpoint)

Then
       Wait  2 minutes 
       Set 'OfficeThermostat' 85° (Cool Setpoint)

Else
  - No Actions - (To add one, press 'Action')

 

Once my IF conditions all become true, the THEN portion of my program runs. During that 2 minute wait, if any of my IF conditions become false, the program aborts and my 2nd THEN statement never runs.

This is an interesting point to consider. In any other automation device I have used the If section acts as a trigger, and once triggered the Then section completes execution regardless of whether the trigger remains true or not. The idea of a trigger needing to stay triggered thoughout execution is definitely a different paradigm for a lot of folks.

  • Author

Mike,

 

I failed to provide more detailed information what program should do. Once triggered and rechecked status after 2 min it should run several actions separated with WAIT statements unconditionally. Otherwise if during 2 min CONTROL will change from ON to OFF do nothing.

Hello Walter,

 

First of all, you were 100% correct in your first post. If you use two programs as you described, with the second disabled, all should work as intended. Good job!

 

Second, Mike's suggestion was excellent, and doesn't apply here only because of the added conditions that you noted in a following post. So do go ahead with the two programs, and please let us know how it goes.

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.