mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 15:08:10 +01:00
Added Nextion display error handling during setup (#5493)
This commit is contained in:
parent
5d5cc96017
commit
9d95f5c1da
1 changed files with 5 additions and 0 deletions
|
@ -61,6 +61,11 @@ bool Nextion::check_connect_() {
|
|||
std::string response;
|
||||
|
||||
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 during setup");
|
||||
return false;
|
||||
}
|
||||
if (response.empty() || response.find("comok") == std::string::npos) {
|
||||
#ifdef NEXTION_PROTOCOL_LOG
|
||||
ESP_LOGN(TAG, "Bad connect request %s", response.c_str());
|
||||
|
|
Loading…
Reference in a new issue