From ac54ccab4b80da9edf66c1cd5ca1e42c43a56bcf Mon Sep 17 00:00:00 2001 From: Miguel Angel Mulero Martinez <migmul@gmail.com> Date: Sat, 9 Apr 2022 10:42:10 +0200 Subject: [PATCH] Ignore leak in genBasic Xiaomi SJCGQ11LM --- lib/xiaomi.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/xiaomi.js b/lib/xiaomi.js index b9790ec74b2ed..176afe1130391 100644 --- a/lib/xiaomi.js +++ b/lib/xiaomi.js @@ -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 { @@ -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}`); }