From 4f2b24f53d67cac9bef36aff93f0f79e92703b16 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:19:00 +0200 Subject: [PATCH] Add entered command to MQTT command unknown message (bis) --- tasmota/tasmota_support/support_command.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index fa16fd460..d09788bf0 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -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; }