Something is wrong with Tuya tank level sensors with the new official integration

I have connected my Tuya account with the Tuya integration of Home Asistant following the directions. Everything is fine. I see the 2 Tuya devices in my house: a light bulb and an ultrasonic water tank level sensor.
But the problem is that it doesn’t “see” any entity of the water tank level sensor device and moreover, in the device view of the Tuya integration the sensor appears with its name and the label “(unsupported)”

I have downloaded the device diagnostic file from the device information page, and surprisingly, in the downloaded json if appears information of the entities and even values of the last readings that correspond to real and reliable data, identical to the values that I observe in the Tuya Smart app. Look at “status” section at the end of the json.

I attach a piece of the diagnostic json below:

{
  "home_assistant": {
    "installation_type": "home_assistant_OS",
    "version": "2024.2.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.1",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Madrid",
    "os_name": "Linux",
    "os_version": "6.1.74-haos",
    "supervisor": "2024.01.1",
    "host_os": "home_assistant_os 11.5",
    "docker_version": "24.0.7",
    "chassis": "embedded",
    "run_as_root": true.
  },
"integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "dependencies": [
      "ffmpeg"
    ],
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "integration_type": "hub",
    "iot_class": "cloud_push",
    "loggers": [
      "tuya_iot"
    ],
    "requirements": [
      "tuya-device-sharing-sdk==0.1.9"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://apigw.tuyaeu.com",
    "terminal_id": "17078*******7fVh5WF",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "id": "bf27a4********368f4w",
    "name": "Nivel del tanque A",
    "category": "ywcgq",
    "product_id": "wtzwyhkev3b4ubns",
    "product_name": "Tank A Level",
    "online": true,
    "sub": false,
    "time_zone": "+01:00",
    "active_time": "2024-01-05T10:22:24+00:00",
    "create_time": "2024-01-05T10:22:24+00:00",
    "update_time": "2024-01-05T10:22:24+00:00",
    "function": {
      "max_set": {
        "type": "Integer",
        "value": {
          "unit": "%",
          "min": 0,
          "max": 100,
          "scale": 0,
          "step": 1
        }
      },
      "mini_set": {
        "type": "Integer",
        "value": {
          "unit": "%",
          "min": 0,
          "max": 100,
          "scale": 0,
          "step": 1
        }
      },
      "installation_height": {
        "type": "Integer",
        "value": {
          "unit": "m",
          "min": 200,
          "max": 2500,
          "scale": 3,
          "step": 1
        }
      },
      "liquid_depth_max": {
        "type": "Integer",
        "value": {
          "unit": "m",
          "min": 100,
          "max": 2400,
          "scale": 3,
          "step": 1
        }
      }
    },
    "status_range": {
      "liquid_state": {
        "type": "Enum",
        "value": {
          "range": [
            "normal",
            "lower_alarm",
            "upper_alarm"
          ]
        }
      },
      "liquid_depth": {
        "type": "Integer",
        "value": {
          "unit": "m",
          "min": 0,
          "max": 10000,
          "scale": 2,
          "step": 1
        }
      },
      "max_set": {
        "type": "Integer",
        "value": {
          "unit": "%",
          "min": 0,
          "max": 100,
          "scale": 0,
          "step": 1
        }
      },
      "mini_set": {
        "type": "Integer",
        "value": {
          "unit": "%",
          "min": 0,
          "max": 100,
          "scale": 0,
          "step": 1
        }
      },
      "installation_height": {
        "type": "Integer",
        "value": {
          "unit": "m",
          "min": 200,
          "max": 2500,
          "scale": 3,
          "step": 1
        }
      },
      "liquid_depth_max": {
        "type": "Integer",
        "value": {
          "unit": "m",
          "min": 100,
          "max": 2400,
          "scale": 3,
          "step": 1
        }
      },
      "liquid_level_percent": {
        "type": "Integer",
        "value": {
          "unit": "%",
          "min": 0,
          "max": 100,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status": {
      "liquid_state": "normal",
      "liquid_depth": 77,
      "max_set": 100,
      "mini_set": 10,
      "installation_height": 980,
      "liquid_depth_max": 140,
      "liquid_level_percent": 97
    },
    "home_assistant": {
      "name": "Nivel del tanque A",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": []
    },
    "set_up": false,
    "support_local": true
  }
}

No entities on device. No logs. No nothing. Only the tag (unsupported) next to the name of the device.

As you can see on this screenshot of my phone, the values of “status” section on the diagnostic json are the same as in my iOS Tuya Smart app.

Hey Victor, it looks like it’s not currently supported in the built-in integration. I had limited success getting it to work with tuya-local, but it was super flaky. I’m working on a PR to get it officially supported: Comparing home-assistant:dev...randvoorhies:tuya-ywcgq-tank-level-sensor · home-assistant/core · GitHub

1 Like

Sounds great! Do you have any idea when it could be included in the main branch?

I’m also facing the same problem with the tank level sensor not supported, thanks @randvoorhies for working on a PR

I created a new Pull Request with the suggested changes from @randvoorhies.

See:

2 Likes

Thanks for getting this pushed through @sprofanter - I didn’t get any notifications from this thread for some reason.

I’m super interested to know how this works for others, as it’s been pretty flaky on my setup. The code delta is very straightforward so I’m pretty confident in it, but I’m not sure if the hardware is crappy or maybe something is weird with my networking setup.

Hey! Just asking here because I´m seeing you have been working on the integration through Tuya.
I have the zigbee version, currently trying to add it with zigbee2mqtt, any ideas on that or should I just ask on the zigbee2mqtt specific forum better?
thanks you in advance for anything n_n

Hello sprofanter,
I have exactly that problem with my tank level. How can I get these update / changes to my home assistant?
can you give me a “how to”, please

1 Like

Hello, I still have the problem. Can anybody help me?

Having same issue here, however the one I’m using is based on ME202W sensor. It’s category in diagnostics is “ywcgq”, same as for TLC2206, but ME202W probe is hanging at the end of wire and it is supposed to be located at the bottom of tank, measuring pressure, probe sends information using RS485 bus to main unit containing ESP with Tuya firmware.

Do you have any updates? Did you get it working in home assistant?

1 Like