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.

Adding commnds after a repeat command

Featured Replies

Posted

I was changing a program today that had several duplicate steps that I determined could be shortened by using a repeat command. But then when I tried to add another command below the repeat group, I can not, it adds the command to the repeat group. Which is not what I want, because I do not want it repeated.

 

EXAMPLE: (This is pseudo code because I am at work, but I think you will get the idea)

 

repeat 2 times 
    Turn on light 25%
    Wait 5 seconds
    Turn on light 50%
    Wait 5 seconds
    Turn on light 75%
    Wait 5 seconds
    Turn on light 100%
    Wait 5 seconds
    Turn light off
send notification

 

Each time I try to add the send notification, it gets included in the repeat command group. I really want to repeat some commands, then do a couple of commands that are not repeated and then do some more commands that are repeated.

Hello Jack,

 

Use another Repeat command to end the loop:

 

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Repeat 5 times
          Set Scene 'FR Lamp' Fade Up
          Wait  1 second
          Set Scene 'FR Lamp' Fade Stop
          Wait  1 second
       Repeat 1 times
          Wait  5 seconds
          Set Scene 'FR Lamp' Off

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


 

Rand

  • Author

Thanks for the suggestion.

 

I thought about that on my drive to work and was going to try it when I got home later tonight.

 

It would be nice to have either a paren option like there is in the IF or a repeatend command.

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.