Koenkk / Koenkk/zigbee2mqtt

Tuya ME201ZEU: pump_mode/pump_control converter error — "Value '4' is not allowed, expected one of 1,0,2"

Open
#33,060 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?

Zigbee2MQTT version: 2.14.0-1 (Home Assistant add-on)
Adapter: Sonoff ZBDongle-E
Device:

Model: Tuya ME201ZEU (ultrasonic liquid level sensor with pump control/relay)
Likely matched against the ME201WZ device definition (same manufacturer fingerprint)
IEEE address: 0xa4c138767ee8fc98

The device repeatedly logs the following error:
z2m: Exception while calling fromZigbee converter: Value '4' is not allowed, expected one of 1,0,2}
This appears to correspond to the pump_mode and/or pump_control exposed select entities. Both entities are permanently stuck in an unknown state in Home Assistant, presumably because the device reports a value (4) that isn't in the converter's enum mapping (currently only 0, 1, 2 are handled).

Other exposed features of the same device (liquid_state, liquid_depth, liquid_level_percent) work correctly and are not affected — only the pump-mode-related enum conversion fails.

What did you expect to happen?

The converter should either accept value 4 as a valid pump mode/control option (please advise what it represents, e.g. an additional manual/test/error mode), or gracefully ignore unknown values instead of throwing an exception.

Additional context:

This device model (ME201ZEU) doesn't appear to be separately documented on zigbee2mqtt.io — only ME201WZ is listed, which per third-party documentation doesn't even expose pump_mode/pump_control, suggesting the definitions may have diverged between hardware variants.
Happy to provide a debug log, zigbee-herdsman-converters version, or run test commands if needed to help pin down the correct mapping for value 4.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.14.1 commit: unknown

Adapter firmware version

6.10.3.0 build 297

Adapter

Sonoff ZBDongle-E

Setup

rpi4-64

Device database.db entry

No response

Debug log

2026-09-06 10:37:15z2m: Exception while calling fromZigbee converter: Value '4' is not allowed, expected one of 1,0,2}
2026-09-06 10:37:35z2m: Exception while calling fromZigbee converter: Value '4' is not allowed, expected one of 1,0,2}
2026-09-06 10:38:15z2m: Exception while calling fromZigbee converter: Value '4' is not allowed, expected one of 1,0,2}
2026-09-06 10:38:55z2m: Exception while calling fromZigbee converter: Value '4' is not allowed, expected one of 1,0,2}

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 with the ME201WZ device definition and the fromZigbee converter path that handles pump_mode and pump_control. Use the reported value 4 and the existing 0, 1, and 2 mappings to determine whether it has a valid meaning or should be ignored. Done means the converter no longer throws for this device and the pump-related entities receive an appropriate state.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.