-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Link
Unknown
Database entry
{"id":4,"type":"Router","ieeeAddr":"0xa4c1387aa5c3783b","nwkAddr":49214,"manufId":4417,"manufName":"_TZE204_7ytnacie","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"\u0015I�0i\u0016I�0i","65506":56,"65508":0,"65534":0,"modelId":"TS0601","manufacturerName":"_TZE204_7ytnacie","powerSource":1,"zclVersion":3,"appVersion":74,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":74,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":1946894323},"lastSeen":1762107608504}
Zigbee2MQTT version
2.6.3 (unknown)
External converter
// TS0601_TZE204_7ytnacie — 4 gangs + backlight + power_on_behavior + child lock
const exposes = require("zigbee-herdsman-converters/lib/exposes");
const tuya = require("zigbee-herdsman-converters/lib/tuya");
const e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: [{modelID: "TS0601", manufacturerName: "_TZE204_7ytnacie"}],
model: "TS0601_4gang_7ytnacie",
vendor: "Tuya",
description: "Tuya wall switch 4 gangs (TS0601, _TZE204_7ytnacie)",
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
// onEvent: tuya.onEventSetTime, // opcional ya uqe me da errores en los logs de forma innecesaria.
configure: tuya.configureMagicPacket,
exposes: [
tuya.exposes.switch().withDescription("All switches (master DP13)"),
tuya.exposes.switch().withEndpoint("l1"),
tuya.exposes.switch().withEndpoint("l2"),
tuya.exposes.switch().withEndpoint("l3"),
tuya.exposes.switch().withEndpoint("l4"),
tuya.exposes.backlightModeOffOn().withAccess(ea.STATE_SET),
e.power_on_behavior().withAccess(ea.STATE_SET),
e.binary("child_lock", ea.STATE_SET, "ON", "OFF").withDescription("Child lock"),
// --- Colores opcionales ---
e
.enum("on_color", ea.STATE_SET, ["red", "blue", "green", "white", "yellow", "magenta", "cyan", "warm_white", "warm_yellow"])
.withDescription("ON color"),
e
.enum("off_color", ea.STATE_SET, ["red", "blue", "green", "white", "yellow", "magenta", "cyan", "warm_white", "warm_yellow"])
.withDescription("OFF color"),
],
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],
[13, "state", tuya.valueConverter.onOff], // master
[14, "power_on_behavior", tuya.valueConverter.powerOnBehaviorEnum],
[16, "backlight_mode", tuya.valueConverter.onOff],
[101, "child_lock", tuya.valueConverter.onOff],
// --- DPs opcionales colores ---
[
103,
"on_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
blue: tuya.enum(1),
green: tuya.enum(2),
white: tuya.enum(3),
yellow: tuya.enum(4),
magenta: tuya.enum(5),
cyan: tuya.enum(6),
warm_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[
104,
"off_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
blue: tuya.enum(1),
green: tuya.enum(2),
white: tuya.enum(3),
yellow: tuya.enum(4),
magenta: tuya.enum(5),
cyan: tuya.enum(6),
warm_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
],
},
endpoint: () => ({l1: 1, l2: 1, l3: 1, l4: 1}),
};
module.exports = definition;What does/doesn't work with the external definition?
Everything is working perfectly — the color changes, the child lock, turning on and off — everything works well and as expected.
Notes
software_build_id: undefined
date_code: ``
endpoints:
{"1":{"clusters":{"input":["genGroups","genScenes","manuSpecificTuya","genBasic"],"output":["genOta","genTime"]},"name":"l1"},"242":{"clusters":{"input":[],"output":["greenPower"]}}}