Code for “Reversed” Contact Sensor

Hey, everyone! Coming over from SmartThings and only a couple days in so far. I’ve searched but haven’t seen anything like this yet.

One of my contact sensors always reports the opposite status of what it actually is. When the door is closed the contact reads open and vice versa. Have tried to fix the HW itself many times over, but it never lasts long. SW is the way to go.

On SmartThings there was a “reversed” code that was out there to help with things like this. I haven’t seen a similar one for Hubitat in my searching. I also don’t believe we can pull the code for existing drivers and edit.

Any chance someone can lend a new guy a hand with this?

What device is this, and what driver are you using?

Just an old SmartThings open/close sensor, NOT a multi-purpose sensor. Looks like my driver currently is just a generic zigbee contact sensor.

1 Like

Was able to just change the SmartThings code to Hubitat by replacing a few “physical graphs” with “Hubitat”. Super easy! I don’t know if it’s allowed to share updated code like that, but please just ask if anyone runs into the same issue they’d like to fix.

As long as the source isn't under a copyright then sure..

2 Likes