diff --git a/esphome/components/api/homeassistant_service.h b/esphome/components/api/homeassistant_service.h index aa09d1abcc..d8a12a879c 100644 --- a/esphome/components/api/homeassistant_service.h +++ b/esphome/components/api/homeassistant_service.h @@ -26,8 +26,8 @@ template class TemplatableStringValue : public TemplatableValue static std::string value_to_string(T &&val) { - return to_string(std::forward(val)); - } // NOLINT + return to_string(std::forward(val)); // NOLINT + } // Overloads for string types - needed because std::to_string doesn't support them static std::string value_to_string(char *val) {