Skip to content

Commit

Permalink
[Xiaomi wired switch] Parse operation mode response (Koenkk#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI authored and qosmio committed Dec 25, 2019
1 parent cea4943 commit 2a1d652
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions converters/toZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -1998,8 +1998,8 @@ const converters = {
}
},
},
xiaomi_decoupled_mode: {
key: ['decoupled_mode'],
xiaomi_switch_operation_mode: {
key: ['operation_mode'],
convert: (key, value, message, type, postfix) => {
const cid = 'genBasic';
const lookupAttrId = {
Expand All @@ -2008,9 +2008,10 @@ const converters = {
'right': 0xFF23,
};
const lookupState = {
'control_relay': 0x12,
'control_left_relay': 0x12,
'control_right_relay': 0x22,
'decoupled': 0xFE,
'toggle_left': 0x12,
'toggle_right': 0x22,
};
let button;
if (value.hasOwnProperty('button')) {
Expand Down

0 comments on commit 2a1d652

Please sign in to comment.