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
- On the Hubitat hub, go to the Apps Code page and click + New App
- Copy and paste the contents of
master-switch.groovy
and Save - Click + New App again
- Copy and paste the contents of
master-switch-instance.groovy
and click Save - Go to the Apps page, click Add User App, select Master Switch and click Done
App Usage
- Click on Master Switch in your apps list
- Click on Add a new Master Switch
- Choose the master switches
- Chose the linked switches
- 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:
- Ability to specify which linked switched to turn on by a master switch (instead of restoring last)
- 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)