I need set master switch on and off all device . I have code but I test master switch device delay slowly I need device on and off 1 sec ?
preferences {
section(“When this switch is turned on, off or dimmed”) {
input “master”, “capability.switch”, title: “Where?”
}
section(“Turn on or off all of these switches as well”) {
input “switches”, “capability.switch”, multiple: true, required: false
}
section(“And turn off but not on all of these switches”) {
input “offSwitches”, “capability.switch”, multiple: true, required: false
}
section(“And turn on but not off all of these switches”) {
input “onSwitches”, “capability.switch”, multiple: true, required: false
}
section(“And Dim these switches”) {
input “dimSwitches”, “capability.switchLevel”, multiple: true, required: false
}
}
def installed()
{
subscribe(master, “switch.on”, onHandler)
subscribe(master, “switch.off”, offHandler)
subscribe(master, “level”, dimHandler)
}
def updated()
{
unsubscribe()
subscribe(master, “switch.on”, onHandler)
subscribe(master, “switch.off”, offHandler)
subscribe(master, “level”, dimHandler)
}