From 39199e1701fabe26d930e9f26e642a0c41c9eb4c Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 23 Jul 2024 17:18:54 +0200 Subject: [PATCH] clear command output if cf found --- src/command.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/command.cpp b/src/command.cpp index 851d8682f..003cdcd3f 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -353,6 +353,8 @@ uint8_t Command::call(const uint8_t device_type, const char * cmd, const char * return CommandRet::ERROR; } + output.clear(); // we have a command function, clear messages from device_value_info + // before calling the command, check permissions and abort if not authorized if (cf->has_flags(CommandFlag::ADMIN_ONLY) && !is_admin) { LOG_WARNING("Command failed: authentication failed");