mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Fix rule Invalid JSON message
This commit is contained in:
parent
08502aafa9
commit
90bb707430
@ -508,10 +508,11 @@ bool RulesRuleMatch(uint8_t rule_set, String &event, String &rule, bool stop_all
|
|||||||
rule_name = rule_name.substring(0, pos); // "SUBTYPE1#CURRENT"
|
rule_name = rule_name.substring(0, pos); // "SUBTYPE1#CURRENT"
|
||||||
}
|
}
|
||||||
|
|
||||||
String buf = event; // copy the string into a new buffer that will be modified
|
String buf = event; // Copy the string into a new buffer that will be modified
|
||||||
|
|
||||||
//AddLog_P(LOG_LEVEL_DEBUG, PSTR("RUL-RM2: RulesRuleMatch |%s|"), buf.c_str());
|
//AddLog_P(LOG_LEVEL_DEBUG, PSTR("RUL-RM2: RulesRuleMatch |%s|"), buf.c_str());
|
||||||
|
|
||||||
|
buf.replace("\\"," "); // "Disable" any escaped control character
|
||||||
JsonParser parser((char*)buf.c_str());
|
JsonParser parser((char*)buf.c_str());
|
||||||
JsonParserObject obj = parser.getRootObject();
|
JsonParserObject obj = parser.getRootObject();
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user