mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Revert "add json value for rules (#20718)"
This reverts commit 04cd8950a3251b95b5c1806444c62ecf7566520c.
This commit is contained in:
parent
9aa5a6d7fb
commit
00ea2a78d6
@ -709,7 +709,7 @@ void RulesVarReplace(String &commands, const String &sfind, const String &replac
|
|||||||
|
|
||||||
/*******************************************************************************************/
|
/*******************************************************************************************/
|
||||||
|
|
||||||
bool RuleSetProcess(uint8_t rule_set, String &event_saved, const char *json_event)
|
bool RuleSetProcess(uint8_t rule_set, String &event_saved)
|
||||||
{
|
{
|
||||||
bool serviced = false;
|
bool serviced = false;
|
||||||
char stemp[10];
|
char stemp[10];
|
||||||
@ -798,7 +798,6 @@ bool RuleSetProcess(uint8_t rule_set, String &event_saved, const char *json_even
|
|||||||
snprintf_P(stemp, sizeof(stemp), PSTR("%06X"), ESP_getChipId());
|
snprintf_P(stemp, sizeof(stemp), PSTR("%06X"), ESP_getChipId());
|
||||||
RulesVarReplace(commands, F("%DEVICEID%"), stemp);
|
RulesVarReplace(commands, F("%DEVICEID%"), stemp);
|
||||||
RulesVarReplace(commands, F("%MACADDR%"), NetworkUniqueId());
|
RulesVarReplace(commands, F("%MACADDR%"), NetworkUniqueId());
|
||||||
RulesVarReplace(commands, F("%JSON%"), json_event);
|
|
||||||
#if defined(USE_TIMERS)
|
#if defined(USE_TIMERS)
|
||||||
for (uint32_t i = 0; i < MAX_TIMERS; i++) {
|
for (uint32_t i = 0; i < MAX_TIMERS; i++) {
|
||||||
snprintf_P(stemp, sizeof(stemp), PSTR("%%TIMER%d%%"), i +1);
|
snprintf_P(stemp, sizeof(stemp), PSTR("%%TIMER%d%%"), i +1);
|
||||||
@ -909,7 +908,7 @@ bool RulesProcessEvent(const char *json_event)
|
|||||||
|
|
||||||
for (uint32_t i = 0; i < MAX_RULE_SETS; i++) {
|
for (uint32_t i = 0; i < MAX_RULE_SETS; i++) {
|
||||||
if (GetRuleLen(i) && bitRead(Settings->rule_enabled, i)) {
|
if (GetRuleLen(i) && bitRead(Settings->rule_enabled, i)) {
|
||||||
if (RuleSetProcess(i, event_saved, json_event)) { serviced = true; }
|
if (RuleSetProcess(i, event_saved)) { serviced = true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user