[homeassistant] Eliminate heap allocation in text sensor state updates

This commit is contained in:
J. Nick Koston
2026-01-06 12:49:56 -10:00
parent 9ee5c1bb27
commit 6b1a36b416
@@ -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() {