zigbee-herdsman-converters
Version:
Collection of device converters to be used with zigbee-herdsman
57 lines (55 loc) • 2.36 kB
JavaScript
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: ['NUET56-DL27LX1.1'],
model: 'LXZB-12A',
vendor: 'Zemismart',
description: 'RGB LED downlight',
extend: extend.light_onoff_brightness_colortemp_color(),
},
{
zigbeeModel: ['LXT56-LS27LX1.6'],
model: 'HGZB-DLC4-N15B',
vendor: 'Zemismart',
description: 'RGB LED downlight',
extend: extend.light_onoff_brightness_colortemp_color(),
},
{
zigbeeModel: ['TS0302'],
model: 'ZM-CSW032-D',
vendor: 'Zemismart',
description: 'Curtain/roller blind switch',
fromZigbee: [fz.ignore_basic_report, fz.ZMCSW032D_cover_position],
toZigbee: [tz.cover_state, tz.ZMCSW032D_cover_position],
exposes: [e.cover_position()],
meta: {multiEndpoint: true},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
// Configure reporing of currentPositionLiftPercentage always fails.
// https://github.com/Koenkk/zigbee2mqtt/issues/3216
},
},
{
zigbeeModel: ['TS0003'],
model: 'ZM-L03E-Z',
vendor: 'Zemismart',
description: 'Smart light switch - 3 gang with neutral wire',
extend: extend.switch(),
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
endpoint: (device) => {
return {'left': 1, 'center': 2, 'right': 3};
},
meta: {multiEndpoint: true, disableDefaultResponse: 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']);
},
},
];