1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +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 GitHub
parent 7118bea031
commit 3a6a66537c

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());