mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-21 17:56:31 +00:00
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)
|
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';
|
mqtt_data[0] = '\0';
|
||||||
int tele_period_save = tele_period;
|
int tele_period_save = tele_period;
|
||||||
tele_period = 2; // Do not allow HA updates during next function call
|
tele_period = 2; // Do not allow HA updates during next function call
|
||||||
@ -931,7 +931,7 @@ void RulesEvery100ms(void)
|
|||||||
if (strlen(mqtt_data)) {
|
if (strlen(mqtt_data)) {
|
||||||
mqtt_data[0] = '{'; // {"INA219":{"Voltage":4.494,"Current":0.020,"Power":0.089}
|
mqtt_data[0] = '{'; // {"INA219":{"Voltage":4.494,"Current":0.020,"Power":0.089}
|
||||||
ResponseJsonEnd();
|
ResponseJsonEnd();
|
||||||
RulesProcess();
|
RulesProcessEvent(mqtt_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user