What to do if your new Tuya Zigbee sensor isn’t working in ZHA as it should?

One of the main reasons we recommend customers and clients to skip the native Zigbee interface in Home Assistant, called Zigbee Home Automation (or just ZHA for short), is compatibility issues with newer devices. The reason is simple: ZHA is an official add-on managed by the Home Assistant (Nabu Casa) team, and all new devices must go through a gradual review and approval process, which can take several months. In contrast, Zigbee2MQTT is an open community add-on, and approval is much faster.

Still using ZHA instead of Zigbee2MQTT?

We completely understand using ZHA—it’s official, native, and very easy to set up and use. I started with it myself and was satisfied until I ran into compatibility issues. In this article, we’ll focus mainly on two Tuya sensors that are relatively new and very popular. However, they haven’t yet been officially added to ZHA. We’ll walk you through, step by step, what the situation looks like and how you can achieve the desired result. We used the same approach in this article about the Tongou Zigbee circuit breaker.

First Unboxing and Pairing

Pairing itself goes smoothly, but the sensor appears without the expected entities, or with incorrect entities, or maybe just the wrong decimal separator in the units? This is a typical sign of a missing quirk in ZHA:

Google, Re-pairing, and Trying Everything Possible

Next comes re-pairing, checking the manual, searching Google, or maybe even sending an angry email to the seller (us :D) that the sensor doesn’t work! Ideally, you’ve found this article right away. The solution for these two sensors is simple. Just go to the product page and download the appropriate custom quirk.

ts0201_tz3000_yupc0pb7.py - Tuya Zigbee Smart Outdoor Hygrometer and Thermometer – IP65 Waterproof

ts0601_tze284_snx96j9e.py - Tuya Zigbee Temperature Sensor with External Probe

Installing a Quirk in Home Assistant (File Editor)

There’s no need to touch the Home Assistant source code. The quirk is installed as a custom Tuya quirk in /config, just like custom ZHA quirks.

  1. Install the File Editor add-on

    • Settings → Add-ons → Add-on Store.

    • Install File Editor (or Studio Code Server).

  2. Create a folder for Tuya quirks

    • In File Editor, open /config.

    • Create a folder, e.g.:
      tuya_quirks

    • Place the .py files in this folder

  3. Simple edit to configuration.yaml

    • Add the following code to configuration.yaml on a new line:

    • zha:
        enable_quirks: true
        custom_quirks_path: zha_quirks/
  4. Restart Home Assistant

    • A full restart is recommended so that the ZHA add-on loads the new quirk.

  5. You can check if the custom quirks loaded in the Home Assistant log

    • Settings → System → Logs

Re-pair and Done!

After a quick re-pairing, all the expected entities should appear. That’s it—you’re done! There’s nothing else you need to do, and you don’t have to worry that future updates will affect your device. The mapping is set up directly using your own .py files. I just hope this article helped you :)

%s ...
%s
%image %title %code %s