Skip to content

Commit 8a9b987

Browse files
authored
Added BasicSet zwaveEvent so that physical button on/off presses are detected by the Hub
1 parent 0313ab5 commit 8a9b987

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Drivers/fibaro-dimmer-2.src/fibaro-dimmer-2.groovy

+10
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* for the specific language governing permissions and limitations under the License.
1919
*
2020
* added button to the current state so Hubitat apps can pick up the 3 buttons and added doubletap and releasable button: borristhecat 24/5/19
21+
* added basicSet zwave event so physical button presses are handled by the hub. /eriktack 20190812
2122
*/
2223

2324
metadata {
@@ -91,6 +92,15 @@ def zwaveEvent(hubitat.zwave.commands.basicv1.BasicReport cmd) {
9192
}
9293
}
9394

95+
def zwaveEvent(hubitat.zwave.commands.basicv1.BasicSet cmd, ep=null) {
96+
logging("BasicSet: $cmd : Endpoint: $ep")
97+
def event
98+
if (!ep) {
99+
event = [createEvent([name: "switch", value: cmd.value? "on":"off"])]
100+
}
101+
return event
102+
}
103+
94104
def zwaveEvent(hubitat.zwave.commands.sceneactivationv1.SceneActivationSet cmd) {
95105
logging("SceneActivationSet: $cmd")
96106
logging("sceneId: $cmd.sceneId")

0 commit comments

Comments
 (0)