diff --git a/esphome/components/nextion/nextion.cpp b/esphome/components/nextion/nextion.cpp index 4bba33f961..e57a258edb 100644 --- a/esphome/components/nextion/nextion.cpp +++ b/esphome/components/nextion/nextion.cpp @@ -150,27 +150,24 @@ void Nextion::dump_config() { #ifdef USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE ESP_LOGCONFIG(TAG, " Skip handshake: YES"); #else // USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE - ESP_LOGCONFIG(TAG, #ifdef USE_NEXTION_CONFIG_DUMP_DEVICE_INFO + ESP_LOGCONFIG(TAG, " Device Model: %s\n" " FW Version: %s\n" " Serial Number: %s\n" " Flash Size: %s\n" " Max queue age: %u ms\n" " Startup override: %u ms\n", + this->device_model_.c_str(), this->firmware_version_.c_str(), this->serial_number_.c_str(), + this->flash_size_.c_str(), this->max_q_age_ms_, this->startup_override_ms_); #endif // USE_NEXTION_CONFIG_DUMP_DEVICE_INFO #ifdef USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START - " Exit reparse: YES\n" + ESP_LOGCONFIG(TAG, " Exit reparse: YES\n"); #endif // USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START + ESP_LOGCONFIG(TAG, " Wake On Touch: %s\n" " Touch Timeout: %" PRIu16, -#ifdef USE_NEXTION_CONFIG_DUMP_DEVICE_INFO - this->device_model_.c_str(), this->firmware_version_.c_str(), this->serial_number_.c_str(), - this->flash_size_.c_str(), this->max_q_age_ms_, - this->startup_override_ms_ -#endif // USE_NEXTION_CONFIG_DUMP_DEVICE_INFO - YESNO(this->connection_state_.auto_wake_on_touch_), - this->touch_sleep_timeout_); + YESNO(this->connection_state_.auto_wake_on_touch_), this->touch_sleep_timeout_); #endif // USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE #ifdef USE_NEXTION_MAX_COMMANDS_PER_LOOP diff --git a/tests/components/nextion/common.yaml b/tests/components/nextion/common.yaml index 48a7292f43..4373fe5462 100644 --- a/tests/components/nextion/common.yaml +++ b/tests/components/nextion/common.yaml @@ -273,12 +273,9 @@ text_sensor: display: - platform: nextion id: main_lcd - update_interval: 5s - command_spacing: 5ms max_commands_per_loop: 20 max_queue_size: 50 - startup_override_ms: 10000ms # Wait 10s for display ready - max_queue_age: 5000ms # Remove queue items after 5s + update_interval: 5s on_sleep: then: lambda: 'ESP_LOGD("display","Display went to sleep");' @@ -294,3 +291,8 @@ display: on_buffer_overflow: then: logger.log: "Nextion reported a buffer overflow!" + + command_spacing: 5ms + dump_device_info: true + max_queue_age: 5000ms # Remove queue items after 5s + startup_override_ms: 10000ms # Wait 10s for display ready