clear command output if cf found

This commit is contained in:
MichaelDvP
2024-07-23 17:18:54 +02:00
parent ed234f9fee
commit 39199e1701

View File

@@ -353,6 +353,8 @@ uint8_t Command::call(const uint8_t device_type, const char * cmd, const char *
return CommandRet::ERROR; 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 // before calling the command, check permissions and abort if not authorized
if (cf->has_flags(CommandFlag::ADMIN_ONLY) && !is_admin) { if (cf->has_flags(CommandFlag::ADMIN_ONLY) && !is_admin) {
LOG_WARNING("Command failed: authentication failed"); LOG_WARNING("Command failed: authentication failed");