scheduler async, command use string, lowercase

This commit is contained in:
MichaelDvP
2024-07-20 18:21:26 +02:00
parent d35dd1a9c4
commit c21c0b5dd1
9 changed files with 95 additions and 98 deletions

View File

@@ -285,13 +285,9 @@ void Mqtt::on_message(const char * topic, const uint8_t * payload, size_t len) {
if (return_code != CommandRet::OK) {
char error[100];
if (output.size()) {
snprintf(error,
sizeof(error),
"MQTT command failed with error %s (%s)",
(const char *)output["message"],
Command::return_code_string(return_code).c_str());
snprintf(error, sizeof(error), "MQTT command failed with error %s (%s)", (const char *)output["message"], Command::return_code_string(return_code));
} else {
snprintf(error, sizeof(error), "MQTT command failed with error %s", Command::return_code_string(return_code).c_str());
snprintf(error, sizeof(error), "MQTT command failed with error %s", Command::return_code_string(return_code));
}
LOG_ERROR(error);
Mqtt::queue_publish("response", error);