UNPKG

zigbee-herdsman-converters

Version:

Collection of device converters to be used with zigbee-herdsman

25 lines (23 loc) 975 B
const exposes = require('../lib/exposes'); const reporting = require('../lib/reporting'); const extend = require('../lib/extend'); const e = exposes.presets; module.exports = [ { zigbeeModel: ['E220-KR3N0Z0-HA'], model: 'ECW-100-A03', vendor: 'eZEX', description: 'Zigbee switch 3 gang', extend: extend.switch(), exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('center'), e.switch().withEndpoint('bottom')], endpoint: (device) => { return {top: 1, center: 2, bottom: 3}; }, meta: {multiEndpoint: true}, configure: async (device, coordinatorEndpoint, logger) => { await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']); await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']); await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']); }, }, ];