UNPKG

zigbee-herdsman-converters

Version:

Collection of device converters to be used with zigbee-herdsman

92 lines (90 loc) 3.7 kB
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee}; const reporting = require('../lib/reporting'); const extend = require('../lib/extend'); module.exports = [ { zigbeeModel: ['43076'], model: '43076', vendor: 'Enbrighten', description: 'Zigbee in-wall smart switch', extend: extend.switch(), configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']); await reporting.onOff(endpoint); }, }, { zigbeeModel: ['43080'], model: '43080', vendor: 'Enbrighten', description: 'Zigbee in-wall smart dimmer', extend: extend.light_onoff_brightness({noConfigure: true}), configure: async (device, coordinatorEndpoint, logger) => { await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger); const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); await reporting.onOff(endpoint); }, }, { zigbeeModel: ['43102'], model: '43102', vendor: 'Enbrighten', description: 'Zigbee in-wall outlet', extend: extend.switch(), }, { zigbeeModel: ['43100'], model: '43100', vendor: 'Enbrighten', description: 'Plug-in Zigbee outdoor smart switch', extend: extend.switch(), fromZigbee: [fz.command_on_state, fz.command_off_state], configure: async (device, coordinatorEndpoint, logger) => { const endpoint1 = device.getEndpoint(1); const endpoint2 = device.getEndpoint(2); await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']); await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']); await reporting.onOff(endpoint1); }, }, { zigbeeModel: ['43082'], model: '43082', vendor: 'Enbrighten', description: 'Zigbee in-wall smart dimmer', extend: extend.light_onoff_brightness({disableEffect: true, noConfigure: true}), configure: async (device, coordinatorEndpoint, logger) => { await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger); const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); await reporting.onOff(endpoint); }, }, { zigbeeModel: ['43084'], model: '43084', vendor: 'Enbrighten', description: 'Zigbee in-wall smart switch', extend: extend.switch(), configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']); await reporting.onOff(endpoint); }, }, { zigbeeModel: ['43090'], model: '43090', vendor: 'Enbrighten', description: 'Zigbee in-wall smart dimmer', extend: extend.light_onoff_brightness({noConfigure: true}), configure: async (device, coordinatorEndpoint, logger) => { await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger); const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); await reporting.onOff(endpoint); }, }, ];