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.

Easier way to determine if one of multiple switches are switched on

Featured Replies

Posted

Does anyone have a clever way to simplify the if statement below?  I would love it if a scene name containing the devices could be specified, then if any device in the scene is switched off, the program would be triggered.  Listing out all of the devices like I have below means that I have to remember to modify the program whenever the associated scene is updated.

Thanks!

--Andy

If
        Control 'Devices / Foyer / Front Lights FOY_KPL' is switched Off
     Or Control 'Devices / Master Bathroom / Front Light Slave MBA_KPL2' is switched Off
     Or Control 'Devices / Mud Room / Front Lts Slave MUD_KPL' is switched Off
     Or Control 'Devices / Garage / Front Outside Lights Slave' is switched Off
     Or Control 'Devices / Basement / Front Lights Slave BAS_KPL' is switched Off
 
Then
        -- some action to take --
 
Else
   - No Actions - (To add one, press 'Action')
 

Edited by mapeter

Not really.

 

An option is: If you have them all connected in a scene, and they all consistently switch off together, ideally you should only have to check the status of one of them.. e.g. they all go off if one goes off.

 

However, I'd leave it as is.

 

Paul

 

 

 

Does anyone have a clever way to simplify the if statement below?  I would love it if a scene name containing the devices could be specified, then if any device in the scene is switched off, the program would be triggered.  Listing out all of the devices like I have below means that I have to remember to modify the program whenever the associated scene is updated.

Thanks!

--Andy

If
        Control 'Devices / Foyer / Front Lights FOY_KPL' is switched Off
     Or Control 'Devices / Master Bathroom / Front Light Slave MBA_KPL2' is switched Off
     Or Control 'Devices / Mud Room / Front Lts Slave MUD_KPL' is switched Off
     Or Control 'Devices / Garage / Front Outside Lights Slave' is switched Off
     Or Control 'Devices / Basement / Front Lights Slave BAS_KPL' is switched Off
 
Then
        -- some action to take --
 
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.