I picked up my first Lowes Iris Contact Sensor. It works great with Smartthings, but I have it tied to a closet light with the Smart Lighting app and about half the time when I open the door, the light comes on, goes off and comes on again.
When I look at the contact sensor in the app, it goes open-close-open. Is there a way to add bounce logic to the DTH so it will not tell the hub the state has switched until the sensor has been in a constant position for a few fractions of a second?
Your magnet is not positioned optimally. I have witnessed and corrected magnet bounce on several of these. These do not use reed relays, they use hall-effect sensors which effectively measure strength of the magnetic field. They are prone to bouncing anytime the magnet isnt mounted directly parallel or any time they trigger by angular departure or movement other than perpendicular departure.