Simplify page load
To reduce the chances of a serial buffer overflow
This commit is contained in:
@@ -1011,7 +1011,7 @@ display:
|
||||
break;
|
||||
case 10: // light
|
||||
switch (component_id) {
|
||||
case 34: // power_button
|
||||
case 32: // power_button
|
||||
if (!touch_event) { // Release
|
||||
ha_call_service->execute("light.toggle", "", "", detailed_entity->state.c_str());
|
||||
}
|
||||
@@ -1039,7 +1039,7 @@ display:
|
||||
break;
|
||||
case 22: // fan
|
||||
switch (component_id) {
|
||||
case 17: // bt_oscillate
|
||||
case 15: // bt_oscillate
|
||||
if (!touch_event) { // Release
|
||||
ha_call_service->execute("fan.oscillate", "oscillating", "toggle", detailed_entity->state.c_str());
|
||||
}
|
||||
@@ -2999,20 +2999,11 @@ script:
|
||||
parameters:
|
||||
brightness: float
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
- lambda: return (!id(is_uploading_tft));
|
||||
then:
|
||||
- lambda: |-
|
||||
if (!id(is_uploading_tft)) {
|
||||
if (brightness == display_brightness->state and current_page->state != "boot" and current_page->state != "screensaver")
|
||||
disp1->send_command("wakeup_timer.en=1");
|
||||
else
|
||||
disp1->set_backlight_brightness(brightness / 100.0f);
|
||||
current_brightness->update();
|
||||
}
|
||||
- delay: 5s
|
||||
- lambda: if (!id(is_uploading_tft)) current_brightness->update();
|
||||
- lambda: |-
|
||||
if (!id(is_uploading_tft)) {
|
||||
disp1->set_backlight_brightness(brightness / 100.0f);
|
||||
current_brightness->update();
|
||||
}
|
||||
|
||||
- id: set_climate
|
||||
mode: restart
|
||||
|
||||
Reference in New Issue
Block a user