From dcb57d11e3e22705fe666b150541f81a9aa06791 Mon Sep 17 00:00:00 2001 From: Justifiably Date: Wed, 1 Jul 2020 13:58:31 +0100 Subject: [PATCH] Spurious low LMT01 pulse are sometimes seen, ignore them. --- tasmota/xsns_74_lmt01.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/xsns_74_lmt01.ino b/tasmota/xsns_74_lmt01.ino index 8bd23ca4a..d52e6dae2 100644 --- a/tasmota/xsns_74_lmt01.ino +++ b/tasmota/xsns_74_lmt01.ino @@ -81,7 +81,8 @@ int LMT01_getPulses(void) { hold = lmt01_pulseCount; delay(1); } - if (timeout > 0) { + // discard spurious low counts + if (timeout > 0 && hold >= 10) { return hold; } return -1;