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.

Bathroom Timer Program

Featured Replies

Posted

I have a timer for our bathroom and I have been receiving complaints from the occupants of the lights suddenly turning off, so I figure to add a 1 minutes warning. Here is my code:

 

Bathroom Light Timer

If
       Status  'Bathroom Light' is On

Then
       Wait  30 minutes 
       Set 'Bathroom Light' Off
       Set 'Bathroom Light' On
       Wait  1 minute 
       Set 'Bathroom Light' Off

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

 

First, is this an efficient program and second how would I go about "re-activating" the timer to start the 30 minute count down again?

 

Thanks

  • Author

Ok, activating the switch to the on position restarts the timer.

Hello Mark,

 

In your program below, when you set the bathroom light to off your "if" condition will become false (i.e the bathroom light status is no longer "on"). The remainder of your then statements may not execute.

 

Try using a control condition for your if statement instead (i.e. If bathroom light is switched on). This should prevent the statements in your "then" loop from re-triggering the program.

 

I have a timer for our bathroom and I have been receiving complaints from the occupants of the lights suddenly turning off, so I figure to add a 1 minutes warning. Here is my code:

 

Bathroom Light Timer

If
       Status  'Bathroom Light' is On

Then
       Wait  30 minutes 
       Set 'Bathroom Light' Off
       Set 'Bathroom Light' On
       Wait  1 minute 
       Set 'Bathroom Light' Off

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

 

First, is this an efficient program and second how would I go about "re-activating" the timer to start the 30 minute count down again?

 

Thanks

  • Author

Mike,

I see what you mean, so I decided to change the criteria in my If statement, this seems, to work:

 

If
       Control 'Bathroom Light' is switched On

Then
       Wait  15 minutes
       Set 'Bathroom Light' Off
       Set 'Bathroom Light' On
       Wait  2 minutes 
       Set 'Bathroom Light' Off

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

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.