From 4b16a4bca2f528a8b7a748e2866d2388cec26096 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 29 Nov 2025 23:35:05 -0600 Subject: [PATCH] merge --- esphome/components/text_sensor/text_sensor.cpp | 13 +++---------- esphome/components/text_sensor/text_sensor.h | 5 ----- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/esphome/components/text_sensor/text_sensor.cpp b/esphome/components/text_sensor/text_sensor.cpp index f3d5fda209..d984e78b2a 100644 --- a/esphome/components/text_sensor/text_sensor.cpp +++ b/esphome/components/text_sensor/text_sensor.cpp @@ -25,21 +25,14 @@ void log_text_sensor(const char *tag, const char *prefix, const char *type, Text } void TextSensor::publish_state(const std::string &state) { -<<<<<<< Updated upstream - this->raw_state = state; - if (this->raw_callback_) { - this->raw_callback_->call(state); - } -======= // Only store raw_state_ separately when filters exist // When no filters, raw_state == state, so we avoid the duplicate storage if (this->filter_list_ != nullptr) { this->raw_state_ = state; } - - // Call raw callbacks (before filters) - this->callbacks_.call_first(this->raw_count_, state); ->>>>>>> Stashed changes + if (this->raw_callback_) { + this->raw_callback_->call(state); + } ESP_LOGV(TAG, "'%s': Received new state %s", this->name_.c_str(), state.c_str()); diff --git a/esphome/components/text_sensor/text_sensor.h b/esphome/components/text_sensor/text_sensor.h index a966552c03..fcfbed2fbc 100644 --- a/esphome/components/text_sensor/text_sensor.h +++ b/esphome/components/text_sensor/text_sensor.h @@ -62,15 +62,10 @@ class TextSensor : public EntityBase, public EntityBase_DeviceClass { CallbackManager callback_; ///< Storage for filtered state callbacks. Filter *filter_list_{nullptr}; ///< Store all active filters. -<<<<<<< Updated upstream -======= /// Raw state (before filters). Only populated when filters are configured. /// When no filters exist, get_raw_state() returns state directly. std::string raw_state_; - - uint8_t raw_count_{0}; ///< Number of raw callbacks (partition point in callbacks_ vector) ->>>>>>> Stashed changes }; } // namespace text_sensor