diff --git a/components/tc_bus/protocol.cpp b/components/tc_bus/protocol.cpp index 6852f6b..e869d10 100644 --- a/components/tc_bus/protocol.cpp +++ b/components/tc_bus/protocol.cpp @@ -341,7 +341,7 @@ namespace esphome return data; } - CommandType string_to_command_type(const std::string& str) + CommandType string_to_command_type(std::string str) { if (str == "DOOR_CALL") return COMMAND_TYPE_DOOR_CALL; if (str == "FLOOR_CALL") return COMMAND_TYPE_FLOOR_CALL; diff --git a/components/tc_bus/protocol.h b/components/tc_bus/protocol.h index f658414..01d0cc5 100644 --- a/components/tc_bus/protocol.h +++ b/components/tc_bus/protocol.h @@ -49,7 +49,7 @@ namespace esphome CommandData parseCommand(uint32_t command); const char* command_type_to_string(CommandType type); - const CommandType* string_to_command_type(std::string type); + const CommandType string_to_command_type(std::string str); } // namespace tc_bus } // namespace esphome \ No newline at end of file