UNPKG

zigbee-herdsman-converters

Version:

Collection of device converters to be used with zigbee-herdsman

73 lines (71 loc) 2.96 kB
const exposes = require('../lib/exposes'); const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee}; const reporting = require('../lib/reporting'); const extend = require('../lib/extend'); const e = exposes.presets; module.exports = [ { zigbeeModel: ['ZLL-ExtendedColo', 'ZLL-ExtendedColor', 'AD-RGBW3001'], model: '81809/81813', vendor: 'AduroSmart', description: 'ERIA colors and white shades smart light bulb A19/BR30', extend: extend.light_onoff_brightness_colortemp_color(), meta: {applyRedFix: true}, endpoint: (device) => { return {'default': 2}; }, }, { zigbeeModel: ['Adurolight_NCC'], model: '81825', vendor: 'AduroSmart', description: 'ERIA smart wireless dimming switch', fromZigbee: [fz.command_on, fz.command_off, fz.legacy.eria_81825_updown], exposes: [e.action(['on', 'off', 'up', 'down'])], toZigbee: [], configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); }, }, { zigbeeModel: ['AD-Dimmer'], model: '81849', vendor: 'AduroSmart', description: 'ERIA build-in multi dimmer module 300W', 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); await reporting.brightness(endpoint); }, }, { zigbeeModel: ['BDP3001'], model: '81855', vendor: 'AduroSmart', description: 'ERIA smart plug (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); await reporting.brightness(endpoint); }, }, { zigbeeModel: ['BPU3'], model: 'BPU3', vendor: 'AduroSmart', description: 'ERIA smart plug', extend: extend.switch(), configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']); await reporting.onOff(endpoint); }, }, ];