Created
May 3, 2022 11:35
-
-
Save TheTimmaeh/47ef16e8621ca2addf5a4ad5717c1744 to your computer and use it in GitHub Desktop.
Custom converter for the MFKZQ01LM Mi/Aqara smart home cube. Exposes 'side' in addition to the usual exposed device capabilities.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 e = exposes.presets; | |
const ea = exposes.access; | |
const definition = { | |
zigbeeModel: ['lumi.sensor_cube', 'lumi.sensor_cube.aqgl01'], | |
model: 'MFKZQ01LM', | |
vendor: 'Xiaomi', | |
description: 'Mi/Aqara smart home cube (Custom)', | |
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}}, | |
fromZigbee: [fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog], | |
exposes: [e.battery(), e.battery_voltage(), e.angle('action_angle'), | |
e.cube_side('side'), e.cube_side('action_from_side'), e.cube_side('action_side'), e.cube_side('action_to_side'), | |
e.action(['shake', 'wakeup', 'fall', 'tap', 'slide', 'flip180', 'flip90', 'rotate_left', 'rotate_right'])], | |
toZigbee: [], | |
}; | |
module.exports = definition; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment