Melery intelligent switch socket 8 port TS0601 _TZE204_wktrysab , new device convertor file, that works for me. zigbee2mqtt.
It was unsupported first, follow guidelines to enter new devices on the site:
Convertor Code:
‘’’
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const modernExtend = require('zigbee-herdsman-converters/lib/modernExtend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const definition = {
// Since a lot of Tuya devices use the same modelID, but use different datapoints
// it's necessary to provide a fingerprint instead of a zigbeeModel
fingerprint: [
{
modelID: 'TS0601',
manufacturerName: '_TZE204_wktrysab',
},
],
zigbeeModel: ['TS0601'],
model: 'TS0601',
vendor: '_TZE204_wktrysab',
description: '8 gang wall touch switch board',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
onEvent: tuya.onEventSetTime,
configure: tuya.configureMagicPacket,
exposes: [...Array.from({length: 8}, (_, i) => tuya.exposes.switch().withEndpoint(`l${i + 1}`))],
endpoint: (device) => {
return {
l1: 1,
l2: 1,
l3: 1,
l4: 1,
l5: 1,
l6: 1,
l7: 1,
l8: 1,
};
},
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[1, 'state_l1', tuya.valueConverter.onOff],
[2, 'state_l2', tuya.valueConverter.onOff],
[3, 'state_l3', tuya.valueConverter.onOff],
[4, 'state_l4', tuya.valueConverter.onOff],
[5, 'state_l5', tuya.valueConverter.onOff],
[6, 'state_l6', tuya.valueConverter.onOff],
[0x65, 'state_l7', tuya.valueConverter.onOff],
[0x66, 'state_l8', tuya.valueConverter.onOff],
],
},
};
module.exports = definition;
‘’’