From 4a9271acedc8cb11829d45c1632723f9c35ec5c5 Mon Sep 17 00:00:00 2001 From: Andre Thomas <470015+andrethomas@users.noreply.github.com> Date: Sat, 28 Dec 2019 17:26:15 +0200 Subject: [PATCH] Update xsns_01_counter.ino --- tasmota/xsns_01_counter.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasmota/xsns_01_counter.ino b/tasmota/xsns_01_counter.ino index c664ff811..985216392 100644 --- a/tasmota/xsns_01_counter.ino +++ b/tasmota/xsns_01_counter.ino @@ -150,9 +150,6 @@ void CounterShow(bool json) ResponseAppend_P(PSTR(",\"COUNTER\":{")); } ResponseAppend_P(PSTR("%s\"C%d\":%s"), (header)?",":"", i +1, counter); - if ((0 == tele_period ) && (Settings.flag3.counter_reset_on_tele)) { - RtcSettings.pulse_counter[i] = 0; - } header = true; #ifdef USE_DOMOTICZ if ((0 == tele_period) && (1 == dsxflg)) { @@ -160,6 +157,9 @@ void CounterShow(bool json) dsxflg++; } #endif // USE_DOMOTICZ + if ((0 == tele_period ) && (Settings.flag3.counter_reset_on_tele)) { + RtcSettings.pulse_counter[i] = 0; + } #ifdef USE_WEBSERVER } else { WSContentSend_PD(PSTR("{s}" D_COUNTER "%d{m}%s%s{e}"),