mirror of
https://github.com/esphome/esphome.git
synced 2026-01-09 11:40:50 -07:00
[homeassistant] Eliminate heap allocation in text sensor state updates (#13035)
This commit is contained in:
@@ -15,7 +15,7 @@ void HomeassistantTextSensor::setup() {
|
|||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "'%s': Got state '%s'", this->entity_id_, state.c_str());
|
ESP_LOGD(TAG, "'%s': Got state '%s'", this->entity_id_, state.c_str());
|
||||||
}
|
}
|
||||||
this->publish_state(state.str());
|
this->publish_state(state.c_str(), state.size());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
void HomeassistantTextSensor::dump_config() {
|
void HomeassistantTextSensor::dump_config() {
|
||||||
|
|||||||
Reference in New Issue
Block a user