Remove is_detected
This commit is contained in:
@@ -27,12 +27,12 @@ esphome:
|
|||||||
timeout: 60s
|
timeout: 60s
|
||||||
- wait_until:
|
- wait_until:
|
||||||
condition:
|
condition:
|
||||||
- lambda: !lambda return disp1->is_detected();
|
- lambda: !lambda return disp1->is_setup();
|
||||||
timeout: 20s
|
timeout: 20s
|
||||||
- script.execute: exit_reparse
|
- script.execute: exit_reparse
|
||||||
- wait_until:
|
- wait_until:
|
||||||
condition:
|
condition:
|
||||||
- lambda: !lambda return disp1->is_detected();
|
- lambda: !lambda return disp1->is_setup();
|
||||||
timeout: 20s
|
timeout: 20s
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
static const char *const TAG = "on_boot";
|
static const char *const TAG = "on_boot";
|
||||||
@@ -50,7 +50,7 @@ esphome:
|
|||||||
};
|
};
|
||||||
|
|
||||||
nextion_status->execute();
|
nextion_status->execute();
|
||||||
if (not disp1->is_detected()) {
|
if (not disp1->is_setup()) {
|
||||||
ESP_LOGE(TAG, "No response from Nextion display");
|
ESP_LOGE(TAG, "No response from Nextion display");
|
||||||
ESP_LOGD(TAG, "Turn off Nextion");
|
ESP_LOGD(TAG, "Turn off Nextion");
|
||||||
screen_power->turn_off();
|
screen_power->turn_off();
|
||||||
@@ -62,12 +62,12 @@ esphome:
|
|||||||
}
|
}
|
||||||
- wait_until:
|
- wait_until:
|
||||||
condition:
|
condition:
|
||||||
- lambda: !lambda return disp1->is_detected();
|
- lambda: !lambda return disp1->is_setup();
|
||||||
timeout: 20s
|
timeout: 20s
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
static const char *const TAG = "on_boot";
|
static const char *const TAG = "on_boot";
|
||||||
nextion_status->execute();
|
nextion_status->execute();
|
||||||
if (not disp1->is_detected()) {
|
if (not disp1->is_setup()) {
|
||||||
ESP_LOGE(TAG, "No response from Nextion display");
|
ESP_LOGE(TAG, "No response from Nextion display");
|
||||||
}
|
}
|
||||||
ESP_LOGD(TAG, "Finished");
|
ESP_LOGD(TAG, "Finished");
|
||||||
@@ -2646,7 +2646,7 @@ script:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
static const char *const TAG = "script.nextion_status";
|
static const char *const TAG = "script.nextion_status";
|
||||||
ESP_LOGD(TAG, "Nextion status:");
|
ESP_LOGD(TAG, "Nextion status:");
|
||||||
ESP_LOGD(TAG, " Is detected: %s", disp1->is_detected() ? "True" : "False");
|
//ESP_LOGD(TAG, " Is detected: %s", disp1->is_detected() ? "True" : "False");
|
||||||
ESP_LOGD(TAG, " Is setup: %s", disp1->is_setup() ? "True" : "False");
|
ESP_LOGD(TAG, " Is setup: %s", disp1->is_setup() ? "True" : "False");
|
||||||
|
|
||||||
##### ADD-ONS ############################################################
|
##### ADD-ONS ############################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user