1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-08 04:43:46 +01:00

[nextion] Reduce DEBUG logs on events (#11014)

This commit is contained in:
Edward Firmo
2025-10-06 03:11:36 +02:00
committed by GitHub
parent da2089c8be
commit a3622d878d

View File

@@ -77,7 +77,7 @@ bool Nextion::check_connect_() {
this->recv_ret_string_(response, 0, false);
if (!response.empty() && response[0] == 0x1A) {
// Swallow invalid variable name responses that may be caused by the above commands
ESP_LOGD(TAG, "0x1A error ignored (setup)");
ESP_LOGV(TAG, "0x1A error ignored (setup)");
return false;
}
if (response.empty() || response.find("comok") == std::string::npos) {
@@ -334,7 +334,7 @@ void Nextion::loop() {
this->started_ms_ = App.get_loop_component_start_time();
if (this->started_ms_ + this->startup_override_ms_ < App.get_loop_component_start_time()) {
ESP_LOGD(TAG, "Manual ready set");
ESP_LOGV(TAG, "Manual ready set");
this->connection_state_.nextion_reports_is_setup_ = true;
}
}
@@ -544,7 +544,7 @@ void Nextion::process_nextion_commands_() {
uint8_t page_id = to_process[0];
uint8_t component_id = to_process[1];
uint8_t touch_event = to_process[2]; // 0 -> release, 1 -> press
ESP_LOGD(TAG, "Touch %s: page %u comp %u", touch_event ? "PRESS" : "RELEASE", page_id, component_id);
ESP_LOGV(TAG, "Touch %s: page %u comp %u", touch_event ? "PRESS" : "RELEASE", page_id, component_id);
for (auto *touch : this->touch_) {
touch->process_touch(page_id, component_id, touch_event != 0);
}
@@ -559,7 +559,7 @@ void Nextion::process_nextion_commands_() {
}
uint8_t page_id = to_process[0];
ESP_LOGD(TAG, "New page: %u", page_id);
ESP_LOGV(TAG, "New page: %u", page_id);
this->page_callback_.call(page_id);
break;
}
@@ -577,7 +577,7 @@ void Nextion::process_nextion_commands_() {
const uint16_t x = (uint16_t(to_process[0]) << 8) | to_process[1];
const uint16_t y = (uint16_t(to_process[2]) << 8) | to_process[3];
const uint8_t touch_event = to_process[4]; // 0 -> release, 1 -> press
ESP_LOGD(TAG, "Touch %s at %u,%u", touch_event ? "PRESS" : "RELEASE", x, y);
ESP_LOGV(TAG, "Touch %s at %u,%u", touch_event ? "PRESS" : "RELEASE", x, y);
break;
}
@@ -676,7 +676,7 @@ void Nextion::process_nextion_commands_() {
}
case 0x88: // system successful start up
{
ESP_LOGD(TAG, "System start: %zu", to_process_length);
ESP_LOGV(TAG, "System start: %zu", to_process_length);
this->connection_state_.nextion_reports_is_setup_ = true;
break;
}
@@ -922,7 +922,7 @@ void Nextion::set_nextion_sensor_state(NextionQueueType queue_type, const std::s
}
void Nextion::set_nextion_text_state(const std::string &name, const std::string &state) {
ESP_LOGD(TAG, "State: %s='%s'", name.c_str(), state.c_str());
ESP_LOGV(TAG, "State: %s='%s'", name.c_str(), state.c_str());
for (auto *sensor : this->textsensortype_) {
if (name == sensor->get_variable_name()) {
@@ -933,7 +933,7 @@ void Nextion::set_nextion_text_state(const std::string &name, const std::string
}
void Nextion::all_components_send_state_(bool force_update) {
ESP_LOGD(TAG, "Send states");
ESP_LOGV(TAG, "Send states");
for (auto *binarysensortype : this->binarysensortype_) {
if (force_update || binarysensortype->get_needs_to_send_update())
binarysensortype->send_state_to_nextion();