Hello,
Does anyone know if you can stop a Z-wave switch from turning on/off the connected load when the rocker is pressed?
My situation is that I have a porch light connected to a z-wave switch and a lamp connected to a z-wave outlet. The porch light is programmed to turn on at sunset and off at sunrise so I never use the physical switch. My wife does not like the idea of using an app or schedule to turn on/off the lamp so my thought was to use the physical switch for the porch light to control the z-wave outlet for the lamp. I’ve been able to write an app similar to the Double Tap app that can turn on/off the lamp when it senses a physical press of the switch but it still toggles state for the porch light which is not desired.
Is there any way to not toggle power to the load on the z-wave switch without remembering the state programmatically then changing it back to the original state after the button is pressed?
Thanks!
def initialize() {
subscribe(triggerSwitch,"switch",triggerSwitchPressed,[filterEvents: false])
}
def triggerSwitchPressed(evt){
log.debug evt
if (evt.isPhysical()) {
if (evt.value == "on") {
log.debug "swtich pressed On"
switchesToControl.on()
//would need to recall state of triggerSwitch here and flip it back to the original state
} else if (evt.value == "off") {
log.debug "swtich pressed Off"
switchesToControl.off()
//would need to recall state of triggerSwitch here and flip it back to the original state
}
}
else {
log.trace "Skipping digital on/off event"
}
}