Assistance with Device Handlers (Open/close sensor reporting backwards)

Here is my scenario… I have 34 devices… several Open/Close Sensors. 6 moths ago, the living room slider began reports a reversed status (mobile app and IDE shop closed when the magnet contact is in an open state). Other than reporting reversed status, the device is functioning normally and reliably.

I went through several sessions with SmartThings Support and they wrote it off as defective. I replaced the sensor and all was well again. I now have two more sensors (Office Slider and Kitchen slider again are now reporting reversed status (grrr). Obviously I can 1. replace the otherwise functional sensors. 2. remove the sensors from the Smart Home Monitor and write rules that Alert when the door “Closes” (actually opens).

I want to modify (create) a device handler that will receive the reversed status and display correctly in the mobile app. (Dashboard shows “closed and blue” when the device is actually reporting “open and orange”

I have been able to modify the SmartSense Open/Closed sensor device handler so at least the “open” status and tile are blue, but beyond that, I am stuck.

Anyone have a similar situation an offer assistance with modifying the device handler to reflect a reversed status?

Thanks in advance,


After screwing with the code and switching device handlers for the affected devices… the devices began reporting correct status again! Something in the backend gets hosed and it seems changing the device handler for the affected device clears the reverse reporting!

all is well again.