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.

Wait does not work correctly...

Featured Replies

Posted

I have a program that turns on a light based on motion from sunset to sunrise. The program needs to wait 2 minutes before turning off the light. The lights turns on correctly, but does not turn off 2 minutes later.

 

This is my first program using Wait statement, so I am not sure what I am doing wrong, or if I should use something else than the wait command.

 

I am on version 4.0.2

 

 

If
       Status  'OutSide / FrontMotion / FrontMotion-Sensor' is On
   And From    Sunset  - 15 minutes
       To      Sunrise +  5 minutes (next day)
   And Status  'OutSide / Front-Center' is Off

Then
       Set 'OutSide / Front-Center' On
       Wait  2 minutes 
       Set 'OutSide / Front-Center' Off

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


The IF part of your command get re-evaluated during the WAIT command, and on the second eval it's false so the wait cancels and nothing else runs past that. If you want to use the logic as is, have your then run a second program that does the light on/wait/off (with no conditions on the IF). The use of the second program ensures their is nothing to re-evaluate to cause the wait to not complete.

  • Author

Thank bsobel

 

Makes sense, thanks!

 

It works fine now.

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.