Last active
July 31, 2025 16:18
-
-
Save ccfiel/532d0000c2ec584a5e4ff3728c2ebe3c to your computer and use it in GitHub Desktop.
Zigbee2Mqtt Add zemismart Tuya Zigbee Ultrasonic Water Meter Valve
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as exposes from "zigbee-herdsman-converters/lib/exposes"; | |
| import * as tuya from "zigbee-herdsman-converters/lib/tuya"; | |
| const e = exposes.presets; | |
| const ea = exposes.access; | |
| /** @type {import('zigbee-herdsman-converters').Definition} */ | |
| export default { | |
| fingerprint: [ | |
| { | |
| modelID: "TS0601", | |
| manufacturerName: "_TZE284_vuwtqx0t", | |
| }, | |
| ], | |
| model: "TS0601_water_valve", | |
| vendor: "Tuya", | |
| description: "Ultrasonic water meter valve", | |
| fromZigbee: [tuya.fz.datapoints], | |
| toZigbee: [tuya.tz.datapoints], | |
| onEvent: tuya.onEventSetTime, | |
| configure: tuya.configureMagicPacket, | |
| exposes: [ | |
| // Main valve switch | |
| e.switch().setAccess("state", ea.STATE_SET), | |
| // Water consumption sensor | |
| e.numeric("water_consumed", ea.STATE).withUnit("m³").withDescription("Total water consumption").withValueMin(0).withValueStep(0.001), | |
| // Flow rate sensor | |
| e.numeric("flow_rate", ea.STATE).withUnit("m³/h").withDescription("Instantaneous water flow rate").withValueMin(0).withValueStep(0.001), | |
| // Temperature sensor | |
| e.temperature(), | |
| // Voltage monitoring | |
| e.voltage(), | |
| // Auto clean mode toggle | |
| e.binary("auto_clean", ea.STATE_SET, true, false).withDescription("Auto clean mode"), | |
| ], | |
| meta: { | |
| tuyaDatapoints: [ | |
| [1, "water_consumed", tuya.valueConverter.divideBy1000], | |
| [13, "state", tuya.valueConverter.onOffNotStrict], | |
| [14, "auto_clean", tuya.valueConverter.raw], | |
| [21, "flow_rate", tuya.valueConverter.divideBy1000], | |
| [22, "temperature", tuya.valueConverter.divideBy100], | |
| [26, "voltage", tuya.valueConverter.divideBy100], | |
| ], | |
| }, | |
| // Optional: Add device-specific options | |
| options: [ | |
| exposes.options.precision("water_consumed"), | |
| exposes.options.calibration("water_consumed"), | |
| exposes.options.precision("flow_rate"), | |
| exposes.options.calibration("flow_rate"), | |
| exposes.options.precision("temperature"), | |
| exposes.options.calibration("temperature"), | |
| ], | |
| }; | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a folder
external_convertersunderzigbee2mqttex:
/homeassistant/zigbee2mqtt/external_convertersupload tuya_water_meter_converter.mjs in external_converters folder.
Reboot System