zigbee-herdsman-converters
Version:
Collection of device converters to be used with zigbee-herdsman
25 lines (23 loc) • 1.01 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 e = exposes.presets;
module.exports = [
{
zigbeeModel: ['D10110'],
model: 'D10110',
vendor: 'Yookee',
description: 'Smart blind controller',
fromZigbee: [fz.cover_position_tilt, fz.battery],
toZigbee: [tz.cover_state, tz.cover_position_tilt],
meta: {coverInverted: true},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
await reporting.batteryPercentageRemaining(endpoint);
await reporting.currentPositionLiftPercentage(endpoint);
},
exposes: [e.cover_position(), e.battery()],
},
];