mirror of https://github.com/arendst/Tasmota.git
Merge pull request #7178 from ascillato/patch-1
RULES: Fix duplicated BACKLOG when using EVENT inside a BACKLOG
This commit is contained in:
commit
ca46e36bc0
|
@ -438,7 +438,7 @@ bool RuleSetProcess(uint8_t rule_set, String &event_saved)
|
||||||
String ucommand = commands;
|
String ucommand = commands;
|
||||||
ucommand.toUpperCase();
|
ucommand.toUpperCase();
|
||||||
// if (!ucommand.startsWith("BACKLOG")) { commands = "backlog " + commands; } // Always use Backlog to prevent power race exception
|
// if (!ucommand.startsWith("BACKLOG")) { commands = "backlog " + commands; } // Always use Backlog to prevent power race exception
|
||||||
if (ucommand.indexOf("EVENT ") != -1) { commands = "backlog " + commands; } // Always use Backlog with event to prevent rule event loop exception
|
if ((ucommand.indexOf("EVENT ") != -1) && (ucommand.indexOf("BACKLOG ") == -1)) { commands = "backlog " + commands; } // Always use Backlog with event to prevent rule event loop exception
|
||||||
|
|
||||||
RulesVarReplace(commands, F("%VALUE%"), Rules.event_value);
|
RulesVarReplace(commands, F("%VALUE%"), Rules.event_value);
|
||||||
for (uint32_t i = 0; i < MAX_RULE_VARS; i++) {
|
for (uint32_t i = 0; i < MAX_RULE_VARS; i++) {
|
||||||
|
|
Loading…
Reference in New Issue