Koenkk / Koenkk/zigbee2mqtt

Device: Tuya HY08WE wall-mount thermostat (fingerprint: TS0601 / _TZE200_znzs7yaw) Zigbee2MQTT version: 2.12.1

Open
#32,775 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

problem
Dominant language
TypeScript
Stars
15.7k
Forks
2k
Avg merge
18h 55m
Merged PRs (30d)
35

Description

What happened?

Home Assistant repeatedly logs "Invalid modes mode: manual" (hundreds of times
per day) for the Tuya HY08WE wall-mount thermostat (fingerprint: TS0601 /
_TZE200_znzs7yaw), running Zigbee2MQTT 2.12.1.

I traced this to a mismatch in the device definition in
zigbee-herdsman-converters/devices/tuya.js:

  • exposes declares: .withSystemMode(["off", "auto", "heat"], ea.STATE_SET)
  • legacy.fromZigbee.hy_thermostat actually reports:
    system_mode: { 0: "manual", 1: "auto", 2: "away" }[value]
  • legacy.toZigbee.hy_thermostat actually expects:
    { manual: 0, auto: 1, away: 2 }[value]

The declared exposes vocabulary (off/auto/heat) never matches what the
fromZigbee/toZigbee converters actually read and write (manual/auto/away).

What did you expect to happen?

I expected the modes declared in exposes (off/auto/heat) to match the values
actually produced/consumed by the fromZigbee and toZigbee converters, so that:

  1. Home Assistant would not log warnings for the device's normal reported
    states (manual/auto/away).
  2. Setting system_mode to "off" or "heat" from Home Assistant (both declared
    as valid options) would actually work — instead, since toZigbee's lookup
    table only contains manual/auto/away, sending "heat" or "off" resolves to
    undefined and silently fails to control the device.

Suggested fix: align exposes with the real manual/auto/away vocabulary, or
migrate this device to the modern tuyaDatapoints pattern (as already done
for the ZWT07 definition in the same file) — separate a real on/off
system_mode (using the existing hyState datapoint) from a schedule preset
(manual/auto/away via hyMode).

How to reproduce it (minimal and precise)
  1. Pair a Tuya HY08WE thermostat (manufacturerName: _TZE200_znzs7yaw,
    modelID: TS0601) with Zigbee2MQTT.
  2. Let the device report its system_mode as "manual" or "away"
    (e.g. via the physical thermostat controls, or send
    {"system_mode": "manual"} via MQTT set topic).
  3. Observe in Home Assistant logs:
    "Invalid modes mode: manual" from homeassistant.components.mqtt.climate
  4. Separately, try setting the HA climate entity's mode to "heat" (one of
    the 3 modes declared valid) and observe that the physical device does
    not respond correctly, since toZigbee's {manual:0,auto:1,away:2} lookup
    returns undefined for "heat".
Zigbee2MQTT version

2.12.1

Adapter firmware version

8.0.2 [GA] (EmberZNet, build 397)

Adapter

SLZB-MR1U (ember/EZSP)

Setup

Docker container on UGREEN NAS (DXP2800), docker compose, not the Home
Assistant add-on. Zigbee2MQTT and Home Assistant run as separate Docker
containers on the same host.

Device database.db entry

No response

Debug log

No response

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in zigbee-herdsman-converters/devices/tuya.js and inspect the HY08WE definition, its legacy.hy_thermostat converters, and the nearby ZWT07 definition. Compare the exposed modes with the values read and written by those converters. Done means the device definition and converter behavior agree, so reported modes are accepted and each declared mode controls the thermostat correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.