From c8e08d7f8a35ac0037105407d6ee7b3f0c47bd16 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 22 Jun 2020 22:08:03 +0200 Subject: [PATCH] Add rule busy friendly loop --- tasmota/xdrv_10_rules.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/xdrv_10_rules.ino b/tasmota/xdrv_10_rules.ino index ce81f586b..ddeb82403 100644 --- a/tasmota/xdrv_10_rules.ino +++ b/tasmota/xdrv_10_rules.ino @@ -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); } } }