Hi Hubitat Devs!
I'm trying to integrate my devices with Google Home, but unfortunately there are some significant differences in Capability descriptions. Particularly, I'm working with the WaterSensor capability on Hubitat, which is notably absent in Google's API; instead, it is called WaterLeak on Google, and has possible values "leak", "no leak", or "unknown".
Please reference the Google doc here:
And compare with the Hubitat doc here:
My proposition is just to add the missing capabilities, leaving the old ones in place for backwards compatibility.
There is no WaterSensor capability in Hubitat, as you point out by linking to the capability list. Leak sensors are implemented using the Contact Sensor capability in Hubitat, and I believe that is just the way you need to do it, like every other driver that has already been written for Hubitat to implement leak sensors using the Contact Sensor capability.
There are a lot of features missing that I'd like to see, such as input selection for receivers. One example, the Yamaha receiver native to Google Home allows drop downs to select inputs. It would be nice to have the feature for receivers inside of HE.
What makes you think the capability has to have the exact same name in Hubitat to work with Google? Thats why there is an integration app, to handle things like that.
Are you saying that you cannot share a leak sensor to Google because the integration says it is not compatible?
Ah, my brain searched the list for leakSensor, not waterSensor. My bad.
Still, my Zigbee leak sensors just use the generic contact sensor driver in Hubitat. Are there drivers for leak sensors that actually use the waterSensor capability?
Edit, yup, I see there are drivers for water sensors, specifically, for some specific devices.
The Scientific Method. Any devices where the device type does not match between the two APIs are ignored by the Google integration. As in, it does not link the device.
Not sure about the waterSensor capability but why would you use a contact sensor drive for a water sensor instead of Generic Zigbee Moisture Sensor?
What brand is your sensor?
This is coincidence. That's just not a kind of device the integration currently supports. The Hubitat capability name does not matter; it's the job of the integration to translate. This just isn't one that is there yet.
The driver is Generic Zigbee Moisture Sensor. All my SmartThings/Iris/Centralite use this inbuilt driver. I’ve been using HE for 7 years and this driver has been in place since the early days.
I think we confusing terms here. A water sensor in Hubitat is not a moisture sensor that reports a % of water content, it just reports a binary state of wet/not wet.
Moisture is % water in soil.
Humidity is % water in air.
Door sensors sense a magnet contact open or closed
Leak sensor sense a water contact open or closed.
A water sensor in Hubitat's capabilities is a leak sensor, so wet/not wet is the same as open/closed, so it is basically a contact sensor with different attribute state names.
To the point of the original post, what Capability is used to get a value from a sensor doesn't really matter. Much of it is just semantics.
@user2574 I totally agree with you but if you check the compatibility list it looks like the "Moisture" sensors for Zigbee are actually for leak sensors.
@bertabcd1234 Perhaps – I don't have access to the Google Home integration source code. But in that case it's just a bug, since both Hubitat and Google Home both have leak sensor capabilities.
The supported device types for the integration are mentioned here, and anything else you've noticed is merely coincidence: Google Home | Hubitat Documentation
I know there is a community integration, and it's possible it supports this device type. By definition, this integration would not be supported by Hubitat, but if that is something you are comfortable with and this particular kind of device is important for you, you may want to see if that integration meets your needs better.