Add entered command to MQTT command unknown message (bis)

This commit is contained in:
Theo Arends 2024-09-17 10:19:00 +02:00
parent fd7d2fc0a4
commit 4f2b24f53d
1 changed files with 5 additions and 1 deletions

View File

@ -470,7 +470,11 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
if (command_unknown) {
TasmotaGlobal.blinks = 201;
Response_P(PSTR("{\"" D_JSON_COMMAND "\":\"%s%s" D_JSON_UNKNOWN "\"}"), type, (strlen(type))?" ":"");
Response_P(PSTR("{\"" D_JSON_COMMAND "\":\"" D_JSON_UNKNOWN "\""));
if (strlen(type)) {
ResponseAppend_P(PSTR(",\"Input\":\"%s\""), type);
}
ResponseJsonEnd();
snprintf_P(stemp1, sizeof(stemp1), PSTR(D_JSON_COMMAND));
type = (char*)stemp1;
}