[homeassistant] Use buf_append_printf for ESP8266 flash optimization

This commit is contained in:
J. Nick Koston
2026-01-16 11:32:26 -10:00
parent 6832efbacc
commit 075364f4b4

View File

@@ -97,7 +97,7 @@ void HomeassistantNumber::control(float value) {
entity_value.key = VALUE_KEY;
// Stack buffer - no heap allocation; %g produces shortest representation
char value_buf[16];
snprintf(value_buf, sizeof(value_buf), "%g", value);
buf_append_printf(value_buf, sizeof(value_buf), 0, "%g", value);
entity_value.value = StringRef(value_buf);
api::global_api_server->send_homeassistant_action(resp);