Skip to content

Commit

Permalink
Ignore leak in genBasic Xiaomi SJCGQ11LM (Koenkk#4106)
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim authored Apr 9, 2022
1 parent 48f51d4 commit 04b4b83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/xiaomi.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
} else if (['MCCGQ11LM'].includes(model.model)) {
payload.contact = value === 0;
} else if (['SJCGQ11LM'].includes(model.model)) {
payload.water_leak = value === 1;
// Ignore the message. It seems not reliable. See discussion here https://github.com/Koenkk/zigbee2mqtt/issues/12018
// payload.water_leak = value === 1;
} else if (['JTYJ-GD-01LM/BW'].includes(model.model)) {
payload.smoke_density = value;
} else {
Expand Down Expand Up @@ -514,6 +515,9 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
case 'mode':
payload.operation_mode = ['command', 'event'][value];
break;
case 'modelId':
// We ignore it, but we add it here to not shown an unknown key in the log
break;
default:
if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: unknown key ${key} with value ${value}`);
}
Expand Down

0 comments on commit 04b4b83

Please sign in to comment.