Use globals for version

Solves #1794
This commit is contained in:
Edward Firmo
2024-02-15 23:38:45 +01:00
parent 5324c4f4b3
commit 04248847a5
19 changed files with 29 additions and 29 deletions

View File

@@ -1761,8 +1761,8 @@ text_sensor:
- lambda: |-
static const char *const TAG = "text_sensor.version_blueprint";
ESP_LOGD(TAG, "Blueprint version: %s", x.c_str());
disp1->set_component_text_printf("boot.bluep_version", "%s", x.c_str());
if (current_page->state == "boot") {
disp1->set_component_text_printf("boot.bluep_version", "%s", x.c_str());
disp1->send_command_printf("tm_esphome.en=0");
page_boot->execute();
timer_reset_all->execute("boot");
@@ -1781,8 +1781,8 @@ text_sensor:
- lambda: |-
static const char *const TAG = "text_sensor.version_esphome";
ESP_LOGD(TAG, "ESPHome version: %s", x.c_str());
disp1->set_component_text_printf("boot.esph_version", x.c_str());
if (current_page->state == "boot") {
disp1->set_component_text_printf("esph_version", x.c_str());
disp1->send_command_printf("tm_esphome.en=0");
page_boot->execute();
timer_reset_all->execute("boot");
@@ -1792,7 +1792,7 @@ text_sensor:
- id: version_tft
name: Version TFT
platform: nextion
component_name: tft_version
component_name: boot.tft_version
entity_category: diagnostic
icon: mdi:tag-text-outline
internal: false
@@ -1966,6 +1966,7 @@ script:
page_changed->execute(current_page->state.c_str());
}
ESP_LOGV(TAG, "Current page: %s", current_page->state.c_str());
disp1->set_component_text_printf("boot.bluep_version", "%s", blueprint_version.c_str());
- if:
condition:
@@ -1975,7 +1976,6 @@ script:
then:
- lambda: |-
ESP_LOGV("script.global_settings", "Boot page is visible");
disp1->set_component_text_printf("boot.bluep_version", "%s", blueprint_version.c_str());
- wait_until:
condition:
- not:
@@ -2130,7 +2130,7 @@ script:
ESP_LOGV(TAG, "Construct boot page");
set_brightness->execute(100);
disp1->set_component_text_printf("esph_version", "${version}"); // ESPHome version
disp1->set_component_text_printf("boot.esph_version", "${version}"); // ESPHome version
disp1->set_component_text_printf("framework", "%s", id(framework) == 1 ? "Arduino" :
(id(framework) == 2 ? "ESP-IDF" : "Unknown")); // ESPHome framework
disp1->send_command_printf("tm_esphome.en=0");

Binary file not shown.

Binary file not shown.

View File

@@ -99,17 +99,17 @@ Text bluep_label
Text tft_version
Attributes
ID : 8
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2.5
Text : 4.2.6dev
Max. Text Size : 9
Text esph_version
Attributes
ID : 9
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
@@ -119,7 +119,7 @@ Text esph_version
Text bluep_version
Attributes
ID : 10
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none

Binary file not shown.

Binary file not shown.

View File

@@ -99,11 +99,11 @@ Text bluep_label
Text tft_version
Attributes
ID : 8
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2.5
Text : 4.2.6dev
Max. Text Size : 9
Events
@@ -116,7 +116,7 @@ Text tft_version
Text esph_version
Attributes
ID : 9
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
@@ -126,7 +126,7 @@ Text esph_version
Text bluep_version
Attributes
ID : 10
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none

Binary file not shown.

Binary file not shown.

View File

@@ -99,17 +99,17 @@ Text bluep_label
Text tft_version
Attributes
ID : 8
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2.5
Text : 4.2.6dev
Max. Text Size : 9
Text esph_version
Attributes
ID : 9
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
@@ -119,7 +119,7 @@ Text esph_version
Text bluep_version
Attributes
ID : 10
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none

Binary file not shown.

View File

@@ -99,17 +99,17 @@ Text bluep_label
Text tft_version
Attributes
ID : 8
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2.5
Text : 4.2.6dev
Max. Text Size : 9
Text esph_version
Attributes
ID : 9
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
@@ -119,7 +119,7 @@ Text esph_version
Text bluep_version
Attributes
ID : 10
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none

Binary file not shown.

View File

@@ -99,11 +99,11 @@ Text bluep_label
Text tft_version
Attributes
ID : 8
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2.5
Text : 4.2.6dev
Max. Text Size : 9
Events
@@ -116,7 +116,7 @@ Text tft_version
Text esph_version
Attributes
ID : 9
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
@@ -126,7 +126,7 @@ Text esph_version
Text bluep_version
Attributes
ID : 10
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none

Binary file not shown.

View File

@@ -99,17 +99,17 @@ Text bluep_label
Text tft_version
Attributes
ID : 8
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2.5
Text : 4.2.6dev
Max. Text Size : 9
Text esph_version
Attributes
ID : 9
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
@@ -119,7 +119,7 @@ Text esph_version
Text bluep_version
Attributes
ID : 10
Scope : local
Scope : global
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none

Binary file not shown.

Binary file not shown.

Binary file not shown.