[External Converter]: TS0726 from _TZ3002_y7wpizuw
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
Link
https://okashasmart.com/products/flip-series-4-gang-smart-switch
Database entry
not sure
Zigbee2MQTT version
2.12.1 (unknown)
External converter
import * as tuya from 'zigbee-herdsman-converters/lib/tuya';
import * as m from 'zigbee-herdsman-converters/lib/modernExtend';
const definition = {
fingerprint: [
{
modelID: 'TS0726',
manufacturerName: '_TZ3002_y7wpizuw',
},
],
model: 'TS0726_4_gang_y7wpizuw_clean',
vendor: 'Tuya',
description: '4 gang wall switch (Clean Converter)',
extend: [
// 1. Map the string names to the physical endpoint numbers here
m.deviceEndpoints({ endpoints: { l1: 1, l2: 2, l3: 3, l4: 4 } }),
tuya.modernExtend.tuyaBase(),
// 2. Pass the array of strings to the feature extend
tuya.modernExtend.tuyaOnOff({
endpoints: ['l1', 'l2', 'l3', 'l4'],
switchMode: true,
powerOnBehavior2: true,
backlightModeOffOn: true,
indicatorModeNoneRelayPos: true,
onOffCountdown: true,
}),
],
};
export default definition;
What does/doesn't work with the external definition?
This specific fingerprint (_TZ3002_y7wpizuw) suffered from the "master endpoint" bug where sending a command to state triggered all 4 relays at once. It also generated duplicate entities (state_1 and state_l1) when using the standard legacy Tuya converter.
The external converter provided above strictly uses modernExtend.tuyaOnOff with deviceEndpoints mapping. This successfully eliminated the duplicate entities and isolated the relays perfectly.
Notes
software_build_id: undefined
date_code: ``
endpoints:
{"1":{"clusters":{"input":["genIdentify","genGroups","genScenes","genOnOff","57344","manuSpecificTuya3","genBasic"],"output":["genOta","genTime"]},"name":"l1"},"2":{"clusters":{"input":["genGroups","genScenes","genOnOff","manuSpecificTuya3"],"output":[]},"name":"l2"},"3":{"clusters":{"input":["genGroups","genScenes","genOnOff","manuSpecificTuya3"],"output":[]},"name":"l3"},"4":{"clusters":{"input":["genGroups","genScenes","genOnOff","manuSpecificTuya3"],"output":[]},"name":"l4"},"242":{"clusters":{"input":[],"output":["greenPower"]}}}
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
Start by reviewing the external-converter entry points imported from zigbee-herdsman-converters/lib/tuya and lib/modernExtend, then compare the reported TS0726 fingerprint and four endpoint mapping with existing device definitions. Done means the device is supported without duplicate entities and commands to one relay no longer trigger the other three.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100