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.

Programming question

Featured Replies

Posted

I have a Scene that turns on a few devices based on the following program

 

If:

Module Climate Light <5

and From 4:00:00PM

To 8:00:00PM (same day)

 

Then:

Set Scene 'Outdoor Lights' On

 

Else:

Set Scene 'Outdoor Lights' Off

 

 

The problem I have is if I manually turn on one of the lights included in the scene and according to the above statement, the Else is running, it keeps turning off my lights.

 

Any better way of doing what I'm trying to do?

I believe that the weather module updates every minute or so, so it will fire this program each time it updates. You may want to use another program as a binary variable to indicate that you've already handled the "event" for the night. When the light falls below 5 for the first time (your variable program is false), you can turn on the lights and set this program to true. I would then create another program that turns off the lights at 8 PM provided that they were turned on by your first program (which you will know because you set your variable).

 

Make sense?

Hi mitch236,

 

In addition to brad's suggestion, you will have to note that this program is only run if the light level actually changes. So, for instance, if the light level was 5 and still remains 5, this program is not re-evaluated unless the time changes and comes within the range.

 

With kind regards,

Michel

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.