diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index c58fd0c91f..4b1ab73654 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -1910,7 +1910,7 @@ void APIConnection::process_batch_() { uint16_t APIConnection::MessageCreator::operator()(EntityBase *entity, APIConnection *conn, uint32_t remaining_size, bool is_single, uint16_t message_type) const { - if (is_string()) { + if (has_tagged_string_ptr()) { // Handle string-based messages switch (message_type) { #ifdef USE_EVENT