From 51298a6061c48d6e221f5683912b6fd6defa8636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 22 Jan 2018 19:33:03 +0100 Subject: [PATCH] Reset the pulse timeout every time an MQTT message is sent with the non-normal payload value (#454) --- code/espurna/relay.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/espurna/relay.ino b/code/espurna/relay.ino index 8c2b30e5..653780db 100644 --- a/code/espurna/relay.ino +++ b/code/espurna/relay.ino @@ -146,6 +146,9 @@ bool relayStatus(unsigned char id, bool status, bool report, bool group_report) rfbStatus(id, status); #endif + // Update the pulse counter if the relay is already in the non-normal state (#454) + relayPulse(id); + } else { unsigned int current_time = millis();