mirror of https://github.com/arendst/Tasmota.git
Add rule busy friendly loop
This commit is contained in:
parent
610f1cef00
commit
c8e08d7f8a
|
@ -922,7 +922,7 @@ uint8_t rules_xsns_index = 0;
|
|||
|
||||
void RulesEvery100ms(void)
|
||||
{
|
||||
if (Settings.rule_enabled && (uptime > 4)) { // Any rule enabled and allow 4 seconds start-up time for sensors (#3811)
|
||||
if (Settings.rule_enabled && !Rules.busy && (uptime > 4)) { // Any rule enabled and allow 4 seconds start-up time for sensors (#3811)
|
||||
mqtt_data[0] = '\0';
|
||||
int tele_period_save = tele_period;
|
||||
tele_period = 2; // Do not allow HA updates during next function call
|
||||
|
@ -931,7 +931,7 @@ void RulesEvery100ms(void)
|
|||
if (strlen(mqtt_data)) {
|
||||
mqtt_data[0] = '{'; // {"INA219":{"Voltage":4.494,"Current":0.020,"Power":0.089}
|
||||
ResponseJsonEnd();
|
||||
RulesProcess();
|
||||
RulesProcessEvent(mqtt_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue