[Release] Master Switch app

Master Switch app for Hubitat

Use one master switch to control multiple linked switches.

  • Turning master switch off will turn off linked switches.
  • Turning master switch on will restore previously on switches (all on by default).
  • When any of the linked switches are on, the master switch will remain on.
  • When all linked switches are off the master switch will be off.

App Installation

  1. On the Hubitat hub, go to the Apps Code page and click + New App
  2. Copy and paste the contents of master-switch.groovy and Save
  3. Click + New App again
  4. Copy and paste the contents of master-switch-instance.groovy and click Save
  5. Go to the Apps page, click Add User App, select Master Switch and click Done

App Usage

  1. Click on Master Switch in your apps list
  2. Click on Add a new Master Switch
  3. Choose the master switches
  4. Chose the linked switches
  5. Click Done

https://github.com/muxa/hubitat/tree/master/apps/master-switch

This is my first attempt at writing a Hubitat app.
I have used this app for the last couple of weeks. Has been working without any issues.
Here's how I use it:

  • I have replaced existing "dumb" light switches ZigBee light switches
  • Those centrally located switches have been replaced with 3 gang switches, even though there might be only one or two lights connected.
  • The extra unused switches are named like this: "My light (Virtual)" to identity them easily
  • Those "virtual" switches are then used as master switches with the actual light switched linked using the app

Here's the feature roadmap for app:

  1. Ability to specify which linked switched to turn on by a master switch (instead of restoring last)
  2. Ability to specify multiple scenes so that a master switch can be pressed multiple times to cycle through the scenes (and switch all of at the end of the cycle)
5 Likes

After some more time of testing the app I've realised that it really needs ability to switch on only a subset of link lights. E.g. I have a master switch that controls 3 linked switches:

  • Main office light
  • Office window LEDs
  • Office storage light

At the end of the day I want to be able to switch off all those lights with the master switch. However next day I only want that master switch to switch on the office light only.

This is effectively what the roadmap point 1 was about.

To implement this I think I need to change Linked Switches to Switches to turn off and Switches to turn on.

Additional features for this app have been implemented in a different app: [Release] Scene Switch app (beta)

Master Switch App 1.1.0: Added restoreStates boolean to be able to disable restoring light states, so that all linked lights switch on when master switch is on.

Thanks to @tagyoureit for this update!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.