Skip to content

Commit

Permalink
fix(ignore): Fix errors in Xiaomi converters. Koenkk/zigbee2mqtt#17952
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jun 8, 2023
1 parent e662c7b commit 65e0602
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/xiaomi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ const numericAttributes2Payload = async (msg: Fz.Message, meta: Fz.Meta, model:
}
break;
case '4':
payload.mode_switch = getFromLookup(value, {4: 'anti_flicker_mode', 1: 'quick_mode'});
if (['WS-USC01', 'WS-USC02', 'WS-EUK01', 'WS-EUK02', 'QBKG29LM', 'QBKG25LM', 'QBKG38LM', 'QBKG39LM'].includes(model.model)) {
payload.mode_switch = getFromLookup(value, {4: 'anti_flicker_mode', 1: 'quick_mode'});
}
break;
case '5':
assertNumber(value);
Expand All @@ -207,9 +209,7 @@ const numericAttributes2Payload = async (msg: Fz.Message, meta: Fz.Meta, model:
}
break;
case '10':
if (['ZNLDP13LM', 'CTP-R01'].includes(model.model)) {
// We don't know what the value means for these devices.
} else {
if (['SSM-U01', 'DLKZMK11LM', 'SSM-U02', 'DLKZMK12LM'].includes(model.model)) {
payload.switch_type = getFromLookup(value, {1: 'toggle', 2: 'momentary'});
}
break;
Expand Down

0 comments on commit 65e0602

Please sign in to comment.