mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 17:27:45 +01:00
Set text sensor state property to filter output (#2893)
This commit is contained in:
parent
bfbc6a4bad
commit
e32a999cd0
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ void TextSensor::add_on_raw_state_callback(std::function<void(std::string)> call
|
||||||
std::string TextSensor::get_state() const { return this->state; }
|
std::string TextSensor::get_state() const { return this->state; }
|
||||||
std::string TextSensor::get_raw_state() const { return this->raw_state; }
|
std::string TextSensor::get_raw_state() const { return this->raw_state; }
|
||||||
void TextSensor::internal_send_state_to_frontend(const std::string &state) {
|
void TextSensor::internal_send_state_to_frontend(const std::string &state) {
|
||||||
this->state = this->raw_state;
|
this->state = state;
|
||||||
this->has_state_ = true;
|
this->has_state_ = true;
|
||||||
ESP_LOGD(TAG, "'%s': Sending state '%s'", this->name_.c_str(), state.c_str());
|
ESP_LOGD(TAG, "'%s': Sending state '%s'", this->name_.c_str(), state.c_str());
|
||||||
this->callback_.call(state);
|
this->callback_.call(state);
|
||||||
|
|
Loading…
Reference in a new issue