1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

[lvgl] Make image update via lambda work (#7886)

This commit is contained in:
Clyde Stubbs
2024-11-28 14:48:48 +11:00
committed by GitHub
parent d305870284
commit c9b0490305
7 changed files with 52 additions and 28 deletions

View File

@@ -171,9 +171,13 @@ lvgl:
duration: 1s
auto_start: true
on_all_events:
logger.log:
format: "Event %s"
args: ['lv_event_code_name_for(event->code).c_str()']
- logger.log:
format: "Event %s"
args: ['lv_event_code_name_for(event->code).c_str()']
- lvgl.animimg.update:
id: anim_img
src: !lambda "return {dog_image, cat_image};"
duration: 2s
- label:
id: hello_label
text: Hello world
@@ -635,7 +639,7 @@ lvgl:
- image:
grid_cell_row_pos: 0
grid_cell_column_pos: 0
src: dog_image
src: !lambda return dog_image;
on_click:
then:
- lvgl.tabview.select:

View File

@@ -55,5 +55,5 @@ lvgl:
packages:
lvgl: !include lvgl-package.yaml
xvgl: !include common.yaml
<<: !include common.yaml