mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 10:12:52 +00:00
Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: J. Nick Koston <nick@koston.org>
92 lines
1.9 KiB
YAML
92 lines
1.9 KiB
YAML
display:
|
|
- platform: snapshot
|
|
id: sdl0
|
|
auto_clear_enabled: false
|
|
dimensions:
|
|
width: 480
|
|
height: 320
|
|
- platform: sdl
|
|
id: sdl1
|
|
dimensions:
|
|
width: 480
|
|
height: 480
|
|
|
|
lvgl:
|
|
- id: lvgl_0
|
|
default_font: space16
|
|
displays: sdl0
|
|
rotation: 180
|
|
top_layer:
|
|
widgets:
|
|
- obj:
|
|
id: anim_box
|
|
x: 0
|
|
y: 0
|
|
width: 40
|
|
height: 40
|
|
bg_color: 0xFF0000
|
|
animations:
|
|
- id: anim_slide
|
|
duration: 1s
|
|
start_delay: 100ms
|
|
auto_start: true
|
|
loop: true
|
|
timing:
|
|
- round_trip
|
|
- type: ease_in_out
|
|
weight: 0.5
|
|
- type: ease_in
|
|
weight: 0.3
|
|
- type: ease_out
|
|
weight: 0.7
|
|
on_start:
|
|
- logger.log: anim started
|
|
on_stop:
|
|
- logger.log: anim stopped
|
|
widgets:
|
|
- id: anim_box
|
|
x:
|
|
from: 0
|
|
to: !lambda "return 100;"
|
|
opa:
|
|
from: 50%
|
|
to: 100%
|
|
|
|
- id: lvgl_1
|
|
displays: sdl1
|
|
on_idle:
|
|
timeout: 8s
|
|
then:
|
|
if:
|
|
condition:
|
|
lvgl.is_idle:
|
|
lvgl_id: lvgl_1
|
|
timeout: 5s
|
|
then:
|
|
logger.log: Lvgl2 is idle
|
|
widgets:
|
|
- button:
|
|
align: center
|
|
widgets:
|
|
- label:
|
|
text: Click ME
|
|
on_click:
|
|
then:
|
|
- logger.log: Clicked
|
|
- lvgl.animation.stop:
|
|
id: anim_slide
|
|
lvgl_id: lvgl_0
|
|
- lvgl.animation.start:
|
|
id: anim_slide
|
|
lvgl_id: lvgl_0
|
|
# Sliders only and no complex gradients, so the wheel's gradient set-up must still build
|
|
- color_picker:
|
|
id: host_hue_picker
|
|
width: 200
|
|
sliders: hue
|
|
|
|
font:
|
|
- file: "gfonts://Roboto"
|
|
id: space16
|
|
bpp: 4
|