UNPKG

zigbee-herdsman-converters

Version:

Collection of device converters to be used with zigbee-herdsman

39 lines (37 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 extend = require('../lib/extend'); const e = exposes.presets; const ea = exposes.access; module.exports = [ { zigbeeModel: ['tdtqgwv'], model: 'ZSTY-SM-11ZG-US-W', vendor: 'Somgoms', description: '1 gang switch', extend: extend.switch(), exposes: [e.switch().setAccess('state', ea.STATE_SET)], fromZigbee: [fz.tuya_switch, fz.ignore_time_read, fz.ignore_basic_report], toZigbee: [tz.tuya_switch_state], }, { zigbeeModel: ['bordckq'], model: 'ZSTY-SM-1CTZG-US-W', vendor: 'Somgoms', description: 'Curtain switch', fromZigbee: [fz.tuya_cover, fz.ignore_basic_report], toZigbee: [tz.tuya_cover_control, tz.tuya_cover_options], exposes: [e.cover_position().setAccess('position', ea.STATE_SET)], }, { zigbeeModel: ['hpb9yts'], model: 'ZSTY-SM-1DMZG-US-W', vendor: 'Somgoms', description: 'Dimmer switch', fromZigbee: [fz.tuya_dimmer, fz.ignore_basic_report], toZigbee: [tz.tuya_dimmer_state, tz.tuya_dimmer_level], exposes: [e.light_brightness().setAccess('state', ea.STATE_SET).setAccess('brightness', ea.STATE_SET)], extend: extend.light_onoff_brightness(), }, ];