Tuya liquid level sensor TZE200_lvkk0hdg (shipping box labelled TLC2206-ZB-EU)

This device is used a lot, I can see lot of issue with it, and lot of informations, but if you want a basic support not so hard
for exemple

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_lvkk0hdg",
  "modelid": "TS0601",
  "vendor": "Tuya",
  "product": "Tuya liquid level sensor",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_WATER_LEAK_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xEF00"
      ],
      "items": [
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
         "name": "config/tuya_unlock"
        },
        {
          "name": "attr/swversion",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "at": "0x0001",
            "script": "tuya_swversion.js"
          },
          "read": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "at": "0x0001"
          }
        },
        {
          "name": "cap/measured_value/max",
          "parse": {
            "fn": "tuya",
            "dpid": 7,
            "eval": "Item.val = Attr.val;"
          },
          "write": {
            "fn": "tuya",
            "dpid": 7,
            "dt": "0x2b",
            "eval": "Item.val;"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "cap/measured_value/min",
          "parse": {
            "fn": "tuya",
            "dpid": 8,
            "eval": "Item.val = Attr.val;"
          },
          "write": {
            "fn": "tuya",
            "dpid": 8,
            "dt": "0x2b",
            "eval": "Item.val;"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "cap/measured_value/quantity",
          "static": "level"
        },
        {
          "name": "cap/measured_value/substance",
          "static": "percent"
        },
        {
          "name": "cap/measured_value/unit",
          "static": "%"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/measured_value",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 22,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ]
}

This DDF can support min/max set and return a % level.
But This DDf is random I have used min/max, but I think it will be better to use installation_height (19) and liquid_depth_max(21) to set min/max.

And I m using a ZHAWater, so can be a problem in HA, better to use for exemple a ZHAGauge.

1 Like