UNPKG

zigbee-herdsman-converters

Version:

Collection of device converters to be used with zigbee-herdsman

30 lines (28 loc) 1.09 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: ['2_Way_Switch_v1.0', 'On_Off_Switch_v1.0'], model: '14592.0', vendor: 'Vimar', description: '2-way switch IoT connected mechanism', extend: extend.switch(), configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(10); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']); }, }, { zigbeeModel: ['Window_Cov_v1.0'], model: '14594', vendor: 'Vimar', description: 'Roller shutter with slat orientation and change-over relay', fromZigbee: [fz.cover_position_tilt], toZigbee: [tz.cover_state, tz.cover_position_tilt], exposes: [e.cover_position()], }, ];