1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

[nextion] Don't include terminating NUL in nextion text_sensor states (#10273)

This commit is contained in:
Ben Winslow
2025-08-18 20:20:13 -04:00
committed by Jesse Hills
parent 6502ed70de
commit 064385eac6

View File

@@ -764,7 +764,8 @@ void Nextion::process_nextion_commands_() {
variable_name = to_process.substr(0, index);
++index;
text_value = to_process.substr(index);
// Get variable value without terminating NUL byte. Length check above ensures substr len >= 0.
text_value = to_process.substr(index, to_process_length - index - 1);
ESP_LOGN(TAG, "Text sensor: %s='%s'", variable_name.c_str(), text_value.c_str());