窗帘电机,有点小瑕疵,使用完全没问题
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const modernExtend = require('zigbee-herdsman-converters/lib/modernExtend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const definition = {
fingerprint: [{modelID: 'Curtain_ZC004_TLW', manufacturerName: 'anthouse'}],
model: 'MS-108ZR',
vendor: 'Moes',
description: 'Zigbee + RF curtain switch module',
meta: {coverInverted: true},
whiteLabel: [tuya.whitelabel('QA', 'QACZ1', 'Curtain switch', ['_TZ3210_xbpt8ewc'])],
fromZigbee: [fz.tuya_cover_options, fz.cover_position_tilt],
toZigbee: [tz.cover_state, tz.moes_cover_calibration, tz.cover_position_tilt, tz.tuya_cover_reversal],
exposes: [
e.cover_position(),
e.numeric('calibration_time', ea.ALL).withValueMin(0).withValueMax(100),
e.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN']),
e.binary('motor_reversal', ea.ALL, 'ON', 'OFF'),
],
};
module.exports = definition;
|