Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Drivers/zooz/zen21-switch.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,21 @@ void zwaveEvent(hubitat.zwave.commands.centralscenev3.CentralSceneNotification c
sendEvent(evt)
}
}

/**
Handles Push Button events from the Device details which sends them as BigDecimal
**/
void push(BigDecimal button){
Map evt = [name: "pushed", type:"digital", isStateChange:true]
evt.value = button
evt.descriptionText = "${device.displayName} button ${evt.value} pushed"
sendEvent(evt)
}

/**
Handles Push Button events from Rule Machine which sends them as Long
**/
void push(Long button){
push(new BigDecimal(button));
}
}