From 6cbe67200494a7e98d8fd3f581c5c2535cfd5b4c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 18 Jan 2026 18:41:07 -1000 Subject: [PATCH] [tuya] Use buf_append_printf for ESP8266 flash optimization (#13287) --- esphome/components/tuya/text_sensor/tuya_text_sensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/tuya/text_sensor/tuya_text_sensor.cpp b/esphome/components/tuya/text_sensor/tuya_text_sensor.cpp index 36b6d630ae..b15fb6f85a 100644 --- a/esphome/components/tuya/text_sensor/tuya_text_sensor.cpp +++ b/esphome/components/tuya/text_sensor/tuya_text_sensor.cpp @@ -24,7 +24,7 @@ void TuyaTextSensor::setup() { } case TuyaDatapointType::ENUM: { char buf[4]; // uint8_t max is 3 digits + null - snprintf(buf, sizeof(buf), "%u", datapoint.value_enum); + buf_append_printf(buf, sizeof(buf), 0, "%u", datapoint.value_enum); ESP_LOGD(TAG, "MCU reported text sensor %u is: %s", datapoint.id, buf); this->publish_state(buf); break;