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.

testing for control on all switchlincs

Featured Replies

Posted

I'm trying to write a program where the condition is the on or off of any the switchlincs in the house. Is there a better way of testing this condition other than an "or" statement for every on or off command such as below? I have so many switches that this seems rediculous.

 

If

Control 'Basement' is switched Off

Or Control 'Basement' is switched On

Or Control 'Basement slave' is switched Off

Or Control 'Basement slave' is switched On

Or Control 'Den' is switched Off

Or Control 'Den' is switched On

Or Control 'Den slave' is switched Off

Or Control 'Den slave' is switched On

Or Control 'Dining Area' is switched Off

Or Control 'Dining Area' is switched On

Or Control 'Fireplace' is switched Off

Or Control 'Fireplace' is switched On

etc....

etc....

etc....

That is the way it is done. Note that If Control is looking for an Off command from each device. It sounds like you want to know if a device is On or Off which is determined by If Status.

  • Author

That's a lot of conditions......

 

I'm wanting to test if a switch has been pressed, on or off. The if control seems to be working for that.

 

Thanks for the confirmation.

I have a "Control event detection" routine as part of my occupancy programs. This is exactly how it works. Lots of If Control Switched..." statements ored together. Nasty to look at but seems to function just fine. I have two lines for most switches (On/Off) and four lines each for a few dimmers that see fade up/down regularly.

 

-Xathros

FYI I've asked (in the programming improvements area in the past) for the ability to write a program like this based on a scene and have the ISY internally 'break it out' into the list of individual devices (so that if you update the scene membership the program would automatically update).

 

E.g. is control 'All Light Switch Scene' is on and internally the ISY would generate a list much like what you wrote above. We shall see if it is considered...

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.