JKD-816COM-Z: numeric gas/CO alarm states instead of booleans cause unknown states in Home Assistant
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
What happened?
Device: Tuya / Jikaida JKD-816COM-Z
Zigbee model: TS0601
Manufacturer: _TZE204_qaxkdgyt
The device is recognized with native support and a successful interview, but both Home Assistant binary sensors (gas and carbon_monoxide) remain unknown.
MQTT discovery declares boolean payloads:
"payload_off": false,
"payload_on": true
However, Zigbee2MQTT publishes:
{"carbon_monoxide":1,"co":null,"fault":null,"gas":1,"gas_value":null,"self_test":"check_success","silence":false}
The installed device definition uses raw converters:
[1, "gas", tuya.valueConverter.raw],
[18, "carbon_monoxide", tuya.valueConverter.raw],
Fresh reports after a physical self-test confirm that both datapoints use datatype 4 (enum) and contain [1]. The raw converters publish these as numeric values instead of the booleans declared by discovery.
The detector displays 0. Its physical test produces audible signals, and self_test changes from checking to check_success.
What did you expect to happen?
Gas and CO alarm reports should be converted to the correct boolean values, matching MQTT discovery, so Home Assistant can show valid on/off states.
Please confirm the alarm enum mapping for this exact device. A value of 1 was observed after a successful self-test with no ongoing local alarm. An alarm-active value of 0 has NOT been verified.
How to reproduce it (minimal and precise)
- Pair a JKD-816COM-Z (_TZE204_qaxkdgyt) with Zigbee2MQTT.
- Enable Home Assistant MQTT discovery.
- Observe that gas and carbon_monoxide are published as numeric 1 and both HA binary sensors remain unknown.
- Press the physical test button.
- Observe self_test changing to checking and then check_success.
- Observe fresh DP 1 and DP 18 reports with datatype 4 and data [1], still published as numeric 1.
Zigbee2MQTT version
2.14.1
Adapter firmware version
EmberZNet 7.4.5 [GA] (device UI: V1.0.0, SDK 7.4.5)
Adapter
Dongle-M (EFR32MG24), ember driver
Setup
Zigbee2MQTT running in Docker on a Proxmox-hosted system.
Architecture: x64
Kernel: 6.17.4-2-pve
Node.js: v24.18.1
Home Assistant connected through MQTT discovery.
Device database.db entry
No response
Debug log
[2026-09-16 11:39:25] debug: z2m: Received Zigbee message from 'Łazienka_d - czujnik gaz i CO', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0],"type":"Buffer"},"datatype":4,"dp":9}],"seq":8448}' from endpoint 1 with groupID 0
[2026-09-16 11:39:31] debug: z2m: Received Zigbee message from 'Łazienka_d - czujnik gaz i CO', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":9}],"seq":8704}' from endpoint 1 with groupID 0
[2026-09-16 11:39:31] debug: z2m: Received Zigbee message from 'Łazienka_d - czujnik gaz i CO', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":1}],"seq":8960}' from endpoint 1 with groupID 0
[2026-09-16 11:39:31] debug: z2m: Received Zigbee message from 'Łazienka_d - czujnik gaz i CO', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":18}],"seq":9216}' from endpoint 1 with groupID 0
[2026-09-16 11:39:31] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Łazienka_d - czujnik gaz i CO', payload '{"carbon_monoxide":1,"co":null,"fault":null,"gas":1,"gas_value":null,"last_seen":"2026-09-16T09:39:31.953Z","linkquality":20,"self_test":"check_success","silence":false}'
Notes
No reports for concentration datapoints DP 2 / DP 19 or fault DP 11 were observed during the captured self-test.
Are these only reported under particular conditions, or does the device require additional initialization?
No custom converter has been installed. The development branch has not been tested.
zigbee-herdsman-converters: 26.105.0
zigbee-herdsman: 10.9.2
Frontend: 2.15.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the JKD-816COM-Z (_TZE204_qaxkdgyt) device definition and inspect the raw converters for datapoints 1 and 18. Compare their datatype-4 reports with the MQTT discovery payload, then verify that gas and carbon_monoxide produce valid boolean states while confirming the enum mapping from the captured self-test reports.
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
- Mostly clear
- Newbie friendliness
- 55/100