mirror of https://github.com/arendst/Tasmota.git
Add support for resetting counters on tele_period
Add support for resetting counters on tele_period if SetOption78 is enabled.
This commit is contained in:
parent
aefb3fb9de
commit
436cf830b9
|
@ -150,6 +150,9 @@ 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)) {
|
||||
|
|
Loading…
Reference in New Issue