-
- def action(StringBuilder variable, String newValue, String feature) {
- if (!variable.toString().equals(newValue)) {
- String tmpID = id.toString()
- variable.replace(0, variable.length(), newValue)
- println("$feature of the valve with id:$tmpID is $newValue!")
- sendEvent([name: feature, value: newValue, deviceId: tmpID, descriptionText: "",
- displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
- }
- }
-
- // Methods to return values
- def getCurrentValve() {
- return currentValve.toString()
- }