Hi dev community,
Looking to find a solution to getting alternative units to GPM for measuring flow. GPM does not provide anywhere near the necessary resolution to measure the flow rate of my particular application.
Code I had consulted on that I am working with:
void zwaveEvent(hubitat.zwave.commands.meterv5.MeterReport cmd) {
if (cmd.meterValue.size() > 0) {
Map evt = [:]
//Map evt = [name: "watermeter", unit: "GPM"]
if (cmd.meterType == 3) {
switch (cmd.scale) {
case 0:
evt.name = "rate"
evt.value = cmd.scaledMeterValue
evt.unit = "GPM"
evt.descriptionText = "${device.displayName} rate is: ${evt.value}${evt.unit}"
// eventProcess(evt)
sendEvent(evt)
break
}
}
}
}