You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/components/lvgl/_index.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,10 @@ embedded graphics library to create beautiful UIs for any MCU, MPU and display t
16
16
17
17
To use LVGL with a [display](#display-hw) in ESPHome, you'll need an ESP32 or RP2040. PSRAM is not a strict requirement but it is generally recommended, especially for large color displays.
18
18
19
-
The graphic display should be configured with `auto_clear_enabled: false` and should not have any `lambda` set. The LVGL component will take care of the display rendering. For most displays, the `update_interval` should be set to `never`, but note that some displays such as OLED and ePaper will need the update interval set to a suitable value.
19
+
The graphic display should be configured with `auto_clear_enabled: false` and should not have any `lambda` set.
20
+
The LVGL component will take care of the display rendering. For most displays, the `update_interval` should be
21
+
set to `never`, but note that some displays such as OLED and e-paper will need the update interval set to a suitable
22
+
interval, or make use of the [`on_draw_end`](#on_draw_end) trigger to manually update the display.
20
23
21
24
For interactivity, a {{< docref "/components/touchscreen/index" "Touchscreen" >}} (capacitive highly preferred), a {{< docref "/components/sensor/rotary_encoder" >}} or a custom keypad made up from discrete {{< docref "/components/binary_sensor/index" "Binary Sensors" >}} can be used.
22
25
@@ -983,6 +986,22 @@ This [trigger](#lvgl-automation-triggers) is triggered when LVGL is resumed. Thi
983
986
984
987
This [trigger](#lvgl-automation-triggers) is triggered after LVGL has been setup. It is also available on any widget, but the timing is the same.
985
988
989
+
### `on_draw_start`
990
+
991
+
This [trigger](#lvgl-automation-triggers) is executed before each LVGL drawing operation.
992
+
993
+
### `on_draw_end`
994
+
995
+
This [trigger](#lvgl-automation-triggers) is executed after LVGL has completed drawing all updated screen elements. It
996
+
may be used for example to trigger an update of a display component like an e-paper screen that requires the buffer
997
+
to be sent to the display for it to be updated.
998
+
999
+
```yaml
1000
+
lvgl:
1001
+
on_draw_end:
1002
+
component.update: my_display_id
1003
+
```
1004
+
986
1005
## See Also
987
1006
988
1007
- {{< docref "/cookbook/lvgl" "LVGL Examples in the Cookbook" >}}
0 commit comments