Disable boot timer when all info is available
This commit is contained in:
@@ -1815,10 +1815,13 @@ script:
|
||||
ESP_LOGD("script.boot_progress", "Progress: Completed");
|
||||
disp1->set_component_value("boot.progress", 100);
|
||||
} else {
|
||||
step = int(round((blueprint_status->state + (step*10))/2));
|
||||
step = std::min(100, int(round((blueprint_status->state + (step*10))/2)));
|
||||
ESP_LOGD("script.boot_progress", "Progress: %i%%", step);
|
||||
disp1->set_component_value("boot.progress", step);
|
||||
}
|
||||
if (current_page->state == "boot" and !isnan(display_charset->state) and !isnan(display_mode->state) and !version_tft->state.empty())
|
||||
disp1->send_command_printf("tm_esphome.en=0");
|
||||
|
||||
|
||||
- id: change_climate_state
|
||||
mode: restart
|
||||
@@ -1968,9 +1971,12 @@ script:
|
||||
page: string
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGW("DEBUG", "goto_page: from %s to %s", current_page->state.c_str(), page.c_str());
|
||||
if (current_page->state != page)
|
||||
ESP_LOGD("DEBUG", "goto_page: from %s to %s", current_page->state.c_str(), page.c_str());
|
||||
if (current_page->state != page) {
|
||||
disp1->goto_page(page.c_str());
|
||||
} else {
|
||||
ESP_LOGE("DEBUG", "goto_page: from %s to %s", current_page->state.c_str(), page.c_str());
|
||||
}
|
||||
|
||||
- id: ha_button
|
||||
mode: parallel
|
||||
@@ -2049,7 +2055,7 @@ script:
|
||||
disp1->send_command_printf("tm_esphome.en=0");
|
||||
|
||||
- id: page_boot
|
||||
mode: restart
|
||||
mode: single
|
||||
then:
|
||||
- logger.log: Page boot called
|
||||
- lambda: |-
|
||||
@@ -2140,15 +2146,15 @@ script:
|
||||
disp1->set_component_font_color("home.chip_relay1", id(home_relay1_icon_color));
|
||||
disp1->set_component_font_color("home.chip_relay2", id(home_relay2_icon_color));
|
||||
boot_progress->execute(8);
|
||||
boot_progress->execute(9);
|
||||
- wait_until:
|
||||
condition:
|
||||
- lambda: return (wifi_component->is_connected() and api_server->is_connected() and blueprint_status->state > 99);
|
||||
timeout: 10s
|
||||
- lambda: boot_progress->execute(10);
|
||||
- delay: 5s
|
||||
- lambda: |-
|
||||
boot_progress->execute(9);
|
||||
if (notification_sound->state) buzzer->play("two short:d=4,o=5,b=100:16e6,16e6");
|
||||
boot_progress->execute(10);
|
||||
set_brightness->execute(display_brightness->state);
|
||||
ESP_LOGD("script.page_boot", "Jump to wake-up page: %s", wakeup_page_name->state.c_str());
|
||||
goto_page->execute(wakeup_page_name->state.c_str());
|
||||
@@ -2985,7 +2991,4 @@ script:
|
||||
condition:
|
||||
- lambda: return (!isnan(display_charset->state) and !isnan(display_mode->state) and !(version_tft->state.empty()));
|
||||
timeout: 10s
|
||||
- lambda: |-
|
||||
if (current_page->state == "boot")
|
||||
disp1->send_command_printf("tm_esphome.en=%i", (isnan(display_charset->state) or isnan(display_mode->state) or version_tft->state.empty()) ? 1 : 0);
|
||||
...
|
||||
|
||||
@@ -32,13 +32,6 @@ Variable (int32) counter
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -116,8 +109,8 @@ Text esph_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
Text : Waiting...
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bluep_version
|
||||
Attributes
|
||||
@@ -126,12 +119,12 @@ Text bluep_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
Text : Waiting...
|
||||
Max. Text Size : 10
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 14
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
@@ -141,7 +134,7 @@ Text baud_rate
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 15
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
@@ -151,7 +144,7 @@ Text framework
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 16
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -161,7 +154,7 @@ Text unavailable
|
||||
|
||||
Progress Bar progress
|
||||
Attributes
|
||||
ID : 17
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -186,7 +179,7 @@ Dual-state Button bt_reboot
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 13
|
||||
ID : 12
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : yes
|
||||
@@ -224,8 +217,6 @@ Timer tm_esphome
|
||||
prints tft_version.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
covx counter.val,aux1.txt,0,0
|
||||
esph_version.txt="Retry #"+aux1.txt
|
||||
sys0=counter.val%10
|
||||
if(sys0==0)
|
||||
{
|
||||
|
||||
@@ -32,13 +32,6 @@ Variable (int32) counter
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -123,8 +116,8 @@ Text esph_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
Text : Waiting...
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bluep_version
|
||||
Attributes
|
||||
@@ -133,12 +126,12 @@ Text bluep_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
Text : Waiting...
|
||||
Max. Text Size : 10
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 14
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
@@ -148,7 +141,7 @@ Text baud_rate
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 15
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
@@ -158,7 +151,7 @@ Text framework
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 16
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -168,7 +161,7 @@ Text unavailable
|
||||
|
||||
Progress Bar progress
|
||||
Attributes
|
||||
ID : 17
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -193,7 +186,7 @@ Dual-state Button bt_reboot
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 13
|
||||
ID : 12
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : yes
|
||||
@@ -231,8 +224,6 @@ Timer tm_esphome
|
||||
prints tft_version.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
covx counter.val,aux1.txt,0,0
|
||||
esph_version.txt="Retry #"+aux1.txt
|
||||
sys0=counter.val%10
|
||||
if(sys0==0)
|
||||
{
|
||||
|
||||
@@ -32,13 +32,6 @@ Variable (int32) counter
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -116,8 +109,8 @@ Text esph_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
Text : Waiting...
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bluep_version
|
||||
Attributes
|
||||
@@ -126,12 +119,12 @@ Text bluep_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
Text : Waiting...
|
||||
Max. Text Size : 10
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 14
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
@@ -141,7 +134,7 @@ Text baud_rate
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 15
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
@@ -151,7 +144,7 @@ Text framework
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 16
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -161,7 +154,7 @@ Text unavailable
|
||||
|
||||
Progress Bar progress
|
||||
Attributes
|
||||
ID : 17
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -186,7 +179,7 @@ Dual-state Button bt_reboot
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 13
|
||||
ID : 12
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : yes
|
||||
@@ -224,8 +217,6 @@ Timer tm_esphome
|
||||
prints tft_version.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
covx counter.val,aux1.txt,0,0
|
||||
esph_version.txt="Retry #"+aux1.txt
|
||||
sys0=counter.val%10
|
||||
if(sys0==0)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user