Skip to content

Commit 3723dba

Browse files
authored
Merge branch 'next' into i2c
2 parents 8792a0a + 83901b5 commit 3723dba

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

content/automations/actions.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,21 @@ on_...:
460460

461461
- **condition** (**Required**, [condition](#config-condition)): The condition to check.
462462

463-
{{< anchor "lambda_condition" >}}
463+
### `component.is_idle` Condition
464+
465+
This condition checks if a given component is idle. A component is considered to be idle if it has completed
466+
setup, has not been marked as failed, and is not currently being called by the loop task. This is useful for
467+
synchronizing actions with the state of the component, for example, an e-paper display component that requires
468+
a significant amount of time to update the display panel.
469+
470+
```yaml
471+
on_...:
472+
then:
473+
- if:
474+
condition:
475+
component.is_idle: some_component
476+
# ...
477+
```
464478

465479
### `lambda` Condition
466480

content/components/lvgl/_index.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ embedded graphics library to create beautiful UIs for any MCU, MPU and display t
1616

1717
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.
1818

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.
2023

2124
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.
2225

@@ -983,6 +986,22 @@ This [trigger](#lvgl-automation-triggers) is triggered when LVGL is resumed. Thi
983986

984987
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.
985988

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+
9861005
## See Also
9871006

9881007
- {{< docref "/cookbook/lvgl" "LVGL Examples in the Cookbook" >}}

0 commit comments

Comments
 (0)