Skip to content

Commit

Permalink
Support action for QBKG26LM. #1986
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jan 7, 2021
1 parent 23b8c1c commit 345e71a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -3509,7 +3509,7 @@ const converters = {
let buttonLookup = null;
if (['WXKG02LM_rev2', 'WXKG07LM'].includes(model.model)) buttonLookup = {1: 'left', 2: 'right', 3: 'both'};
if (['QBKG12LM', 'QBKG24LM'].includes(model.model)) buttonLookup = {5: 'left', 6: 'right', 7: 'both'};
if (['QBKG25LM'].includes(model.model)) buttonLookup = {41: 'left', 42: 'center', 43: 'right'};
if (['QBKG25LM', 'QKBG26LM'].includes(model.model)) buttonLookup = {41: 'left', 42: 'center', 43: 'right'};

const action = actionLookup[msg.data['presentValue']];
if (buttonLookup) {
Expand Down
7 changes: 5 additions & 2 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,11 @@ const devices = [
vendor: 'Xiaomi',
description: 'Aqara D1 3 gang smart wall switch (with neutral wire)',
extend: preset.switch,
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
fromZigbee: [fz.on_off, fz.xiaomi_operation_mode_opple],
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right'), e.action([
'hold_left', 'single_left', 'double_left', 'triple_left', 'release_left',
'hold_center', 'single_center', 'double_center', 'triple_center', 'release_center',
'hold_right', 'single_right', 'double_right', 'triple_right', 'release_right'])],
fromZigbee: [fz.on_off, fz.xiaomi_operation_mode_opple, fz.xiaomi_multistate_action],
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode],
meta: {configureKey: 1, multiEndpoint: true},
endpoint: (device) => {
Expand Down

0 comments on commit 345e71a

Please sign in to comment.