This commit is contained in:
J. Nick Koston
2025-12-07 10:31:33 -06:00
parent 188148546e
commit d881e6055e
2 changed files with 1 additions and 4 deletions

View File

@@ -866,7 +866,7 @@ uint16_t APIConnection::try_send_text_info(EntityBase *entity, APIConnection *co
msg.mode = static_cast<enums::TextMode>(text->traits.get_mode());
msg.min_length = text->traits.get_min_length();
msg.max_length = text->traits.get_max_length();
msg.set_pattern(text->traits.get_pattern_ref());
msg.set_pattern(text->traits.get_pattern_c_str());
return fill_and_encode_entity_info(text, msg, ListEntitiesTextResponse::MESSAGE_TYPE, conn, remaining_size,
is_single);
}

View File

@@ -2,8 +2,6 @@
#include <string>
#include "esphome/core/string_ref.h"
namespace esphome {
namespace text {
@@ -24,7 +22,6 @@ class TextTraits {
void set_pattern(const char *pattern) { this->pattern_ = pattern; }
std::string get_pattern() const { return std::string(this->pattern_); }
const char *get_pattern_c_str() const { return this->pattern_; }
StringRef get_pattern_ref() const { return StringRef(this->pattern_); }
// Set/get the frontend mode.
void set_mode(TextMode mode) { this->mode_ = mode; }