Simplify page load

To reduce the chances of a serial buffer overflow
This commit is contained in:
Edward Firmo
2024-04-24 11:58:19 +02:00
parent baef06fadf
commit fe26e30a06
90 changed files with 793 additions and 3395 deletions

View File

@@ -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