UNPKG

zigbee-herdsman-converters

Version:

Collection of device converters to be used with zigbee-herdsman

34 lines (32 loc) 1.46 kB
const exposes = require('../lib/exposes'); const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee}; const tz = require('../converters/toZigbee'); const reporting = require('../lib/reporting'); const extend = require('../lib/extend'); const e = exposes.presets; module.exports = [ { zigbeeModel: ['HDC52EastwindFan', 'HBUniversalCFRemote'], model: '99432', vendor: 'Hampton Bay', description: 'Universal wink enabled white ceiling fan premier remote control', fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.fan]), toZigbee: extend.light_onoff_brightness().toZigbee.concat([tz.fan_mode]), exposes: [e.light_brightness(), e.fan().withModes(['low', 'medium', 'high', 'on', 'smart'])], meta: {disableDefaultResponse: true}, configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'hvacFanCtrl']); await reporting.onOff(endpoint); await reporting.brightness(endpoint); await reporting.fanMode(endpoint); }, }, { zigbeeModel: ['ETI 12-in Puff light'], model: '54668161', vendor: 'Hampton Bay', description: '12 in. LED smart puff', extend: extend.light_onoff_brightness_colortemp(), }, ];