As @wackaware mentioned, his device code implements a button.
I use the SmartThings open/close sensor, and finally got tired of looking at the “open” contact sensor in my Things screen. I merged @wackaware’s code with the SmartThings open/close device code to come up with a device that looks like a doorbell (push button) in the device page, but otherwise works like a standard open/close sensor with temperature. This allowed me to keep using the existing SmartApps that subscribe to open / close events, but get a better looking device in the Things page, and will emit proper button pressed / released messages in the activity feed.
The code simply triggers a “push” event when the contact closes, and then 15 seconds later implements a “release”. It will ignore further close events if the button is already “pushed”. This gets rid of the ringing (number of quick open/close events) that I get with my doorbell rings. It probably not a bad idea to make the 15 second value a parameter to be set under prefs, but I’ll leave that as an exercise to the reader