Use send_command from Nextion
This commit is contained in:
@@ -233,7 +233,7 @@ api:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (!id(is_uploading_tft))
|
if (!id(is_uploading_tft))
|
||||||
disp1->send_command_printf("%s", cmd.c_str());
|
disp1->send_command(cmd.c_str());
|
||||||
|
|
||||||
# Changes the foreground color of a specified component on the display.
|
# Changes the foreground color of a specified component on the display.
|
||||||
- service: component_color
|
- service: component_color
|
||||||
@@ -769,7 +769,7 @@ api:
|
|||||||
set_component_visibility->execute("time_total", true);
|
set_component_visibility->execute("time_total", true);
|
||||||
set_component_visibility->execute("time_progress", true);
|
set_component_visibility->execute("time_progress", true);
|
||||||
} else {
|
} else {
|
||||||
disp1->send_command_printf("prg_timer.en=0");
|
disp1->send_command("prg_timer.en=0");
|
||||||
set_component_visibility->execute("time_current", false);
|
set_component_visibility->execute("time_current", false);
|
||||||
set_component_visibility->execute("time_total", false);
|
set_component_visibility->execute("time_total", false);
|
||||||
set_component_visibility->execute("time_progress", false);
|
set_component_visibility->execute("time_progress", false);
|
||||||
@@ -2035,7 +2035,7 @@ script:
|
|||||||
disp1->set_component_value("boot.progress", 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())
|
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");
|
disp1->send_command("tm_esphome.en=0");
|
||||||
|
|
||||||
- id: change_climate_state
|
- id: change_climate_state
|
||||||
mode: restart
|
mode: restart
|
||||||
@@ -2262,7 +2262,7 @@ script:
|
|||||||
#elif defined(USE_ESP_IDF)
|
#elif defined(USE_ESP_IDF)
|
||||||
disp1->set_component_text("framework", "ESP-IDF");
|
disp1->set_component_text("framework", "ESP-IDF");
|
||||||
#endif
|
#endif
|
||||||
disp1->send_command_printf("tm_esphome.en=0");
|
disp1->send_command("tm_esphome.en=0");
|
||||||
|
|
||||||
- id: page_boot
|
- id: page_boot
|
||||||
mode: single
|
mode: single
|
||||||
@@ -2418,7 +2418,7 @@ script:
|
|||||||
current_page->state != "confirm" &&
|
current_page->state != "confirm" &&
|
||||||
current_page->state != "keyb_num") {
|
current_page->state != "keyb_num") {
|
||||||
detailed_entity->publish_state("");
|
detailed_entity->publish_state("");
|
||||||
disp1->send_command_printf("back_page_id=1");
|
disp1->send_command("back_page_id=1");
|
||||||
}
|
}
|
||||||
if (current_page->state != "media_player") {
|
if (current_page->state != "media_player") {
|
||||||
id(last_volume_level) = 0;
|
id(last_volume_level) = 0;
|
||||||
@@ -2812,7 +2812,7 @@ script:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (!id(is_uploading_tft)) {
|
if (!id(is_uploading_tft)) {
|
||||||
if (brightness == display_brightness->state and current_page->state != "boot" and current_page->state != "screensaver")
|
if (brightness == display_brightness->state and current_page->state != "boot" and current_page->state != "screensaver")
|
||||||
disp1->send_command_printf("wakeup_timer.en=1");
|
disp1->send_command("wakeup_timer.en=1");
|
||||||
else
|
else
|
||||||
disp1->set_backlight_brightness(brightness / 100.0f);
|
disp1->set_backlight_brightness(brightness / 100.0f);
|
||||||
current_brightness->update();
|
current_brightness->update();
|
||||||
|
|||||||
Reference in New Issue
Block a user