Skip to content

Instantly share code, notes, and snippets.

@Koenkk
Last active December 12, 2022 20:38
Show Gist options
  • Save Koenkk/f541c3ab99f6f567a067a63b9dcafd17 to your computer and use it in GitHub Desktop.
Save Koenkk/f541c3ab99f6f567a067a63b9dcafd17 to your computer and use it in GitHub Desktop.
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 extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['D10110'],
model: 'D10110',
vendor: 'Yookee',
description: 'Smart blind controller',
fromZigbee: [fz.cover_position_tilt, fz.battery],
meta: {coverInverted: true},
toZigbee: [tz.cover_state, tz.cover_position_tilt],
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()],
},;
module.exports = definition;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment