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
@@ -827,6 +830,22 @@ This [trigger](#lvgl-automation-triggers) is triggered when LVGL is resumed. Thi
827
830
828
831
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.
829
832
833
+
### `on_draw_start`
834
+
835
+
This [trigger](#lvgl-automation-triggers) is executed before each LVGL drawing operation.
836
+
837
+
### `on_draw_end`
838
+
839
+
This [trigger](#lvgl-automation-triggers) is executed after LVGL has completed drawing all updated screen elements. It
840
+
may be used for example to trigger an update of a display component like an e-paper screen that requires the buffer
841
+
to be sent to the display for it to be updated.
842
+
843
+
```yaml
844
+
lvgl:
845
+
on_draw_end:
846
+
component.update: my_display_id
847
+
```
848
+
830
849
## See Also
831
850
832
851
- {{< docref "/cookbook/lvgl" "LVGL Examples in the Cookbook" >}}
0 commit comments