I'm using the built in "Generic Z-Wave Water Sensor" for an Eco-Link sensor I modified to work as a pressure mat (instructables link). Is there a way to update the driver so instead of "wet/dry" it will report something like "stepped on/normal"?
SmartThings had all their device handlers published publicly, so it was easy to copy their code and make small adjustments. I can't seem to find a similar repo for Hubitat.
Hubitat doesn't make their drivers public except for a few rare instances where they were published as examples. The capability for a water sensor specifies the wet/dry response so that is the way the driver is coded. As to your options, you can request a modification (suspect it will be turned down as nonstandard) or you can grab the ST driver code you used before and port it over to HE - this is generally a fairly easy exercise and there are a number of threads that highlight the main areas of concern and if you get stuck there are generally a number of folks on here that will help you out.
@thebearmay and @Eric.C.Miller have described two alternative approaches. Whichever one you take, I would recommend you use a standard Hubitat capability, such as Presence, for your use case.
It will make it easier to incorporate your sensors into built-in apps for automation.
With a little bit of work I was able to tweak the code to report open/closed status's and events rather than the wet/dry ones. Unfortunately, a lot of changes reported Z-Wave issues in the logs.
I'm not a groovy expert so It still shows "temperature" and "tamper" readings even though the device doesn't support it, and regardless of the tweaks I made I can't get rid of the original "water" value from the devices page. Like I said, I was able to get the addition of open/closed reports, but the "water: dry" remains.
Is there a specific are of code I should change to get it to report open/closed values instead of wet/dry? I.e. is there a simple fix to just turn this into an open/close sensor rather than a water sensor?
Unfortunately I’m not a coder, but I’m pretty sure you have to change drivers (briefly) to the generic “device” driver, hit “delete states”, and then change back, to get the old states to go away.
Also, this driver is from Ecolink, and it doesn’t support temperature per se, but is supposed to notify you if the temperature drops below 40 degrees Fahrenheit (freeze detection that isn’t supported as far as I know).
As suggested elsewhere, I hunted down the DTH I was using with SmartThings. I'm new to GitHub but I think this should provide you with a link to the code:
This comes from a SmartThings thread discussing building a pressure mat, however I believe they used an Eco-Link Door/Window sensor (where's mine's built off an Eco-Link Water sensor
PS: Am I correct that the "Tiles" section at the top of SmartThings DTH groovy files are irrelevant when it comes to Hubitat? From what I remember they provided the visual sensor states in the ST app.