From 5016e9fce912bc60fa45b0811174e0e5edb08455 Mon Sep 17 00:00:00 2001 From: koenkk Date: Thu, 22 Jun 2023 20:27:59 +0200 Subject: [PATCH] feat(add): TERNCY-WS01 @gcmilo704 https://github.com/Koenkk/zigbee2mqtt/issues/18086 --- src/devices/terncy.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/devices/terncy.ts b/src/devices/terncy.ts index c67b29d819034..c52d303683b43 100644 --- a/src/devices/terncy.ts +++ b/src/devices/terncy.ts @@ -10,6 +10,25 @@ const e = exposes.presets; const ea = exposes.access; const definitions: Definition[] = [ + { + zigbeeModel: ['TERNCY-WS01-S4'], + model: 'TERNCY-WS01', + vendor: 'TERNCY', + description: 'Smart light switch - 4 gang without neutral wire', + extend: extend.switch(), + exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'), + e.switch().withEndpoint('l4')], + endpoint: (device) => { + return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4}; + }, + meta: {multiEndpoint: true}, + configure: async (device, coordinatorEndpoint, logger) => { + for (const ID of [1, 2, 3, 4]) { + const endpoint = device.getEndpoint(ID); + await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']); + } + }, + }, { zigbeeModel: ['DL001'], model: 'DL001',