[homeassistant] Eliminate heap allocation in text sensor state updates (#13035)
This commit is contained in:
1 parent
3a84e4a0b4
commit
498477c5a2
1 file changed
+1
-1
@@ -15,7 +15,7 @@ void HomeassistantTextSensor::setup() {
|
||||
} else {
|
||||
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() {
|
||||
|
||||
Reference in new issue
Block a user