Use send_command from Nextion
This commit is contained in:
@@ -233,7 +233,7 @@ api:
|
||||
then:
|
||||
- lambda: |-
|
||||
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.
|
||||
- service: component_color
|
||||
@@ -769,7 +769,7 @@ api:
|
||||
set_component_visibility->execute("time_total", true);
|
||||
set_component_visibility->execute("time_progress", true);
|
||||
} 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_total", false);
|
||||
set_component_visibility->execute("time_progress", false);
|
||||
@@ -2035,7 +2035,7 @@ script:
|
||||
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");
|
||||
disp1->send_command("tm_esphome.en=0");
|
||||
|
||||
- id: change_climate_state
|
||||
mode: restart
|
||||
@@ -2262,7 +2262,7 @@ script:
|
||||
#elif defined(USE_ESP_IDF)
|
||||
disp1->set_component_text("framework", "ESP-IDF");
|
||||
#endif
|
||||
disp1->send_command_printf("tm_esphome.en=0");
|
||||
disp1->send_command("tm_esphome.en=0");
|
||||
|
||||
- id: page_boot
|
||||
mode: single
|
||||
@@ -2418,7 +2418,7 @@ script:
|
||||
current_page->state != "confirm" &&
|
||||
current_page->state != "keyb_num") {
|
||||
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") {
|
||||
id(last_volume_level) = 0;
|
||||
@@ -2812,7 +2812,7 @@ script:
|
||||
- lambda: |-
|
||||
if (!id(is_uploading_tft)) {
|
||||
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
|
||||
disp1->set_backlight_brightness(brightness / 100.0f);
|
||||
current_brightness->update();
|
||||
|
||||
Reference in New Issue
Block a user