[homeassistant] Eliminate heap allocation in text sensor state updates (#13035)

This commit is contained in:
J. Nick Koston
2026-01-06 17:53:14 -10:00
committed by GitHub
parent 3a84e4a0b4
commit 498477c5a2

View File

@@ -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() {