mirror of
https://github.com/esphome/esphome.git
synced 2026-09-28 15:30:21 +00:00
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
display:
|
|
- platform: snapshot
|
|
id: snapshot_display
|
|
update_interval: 1s
|
|
show_test_card: true
|
|
# An odd width exercises the row padding in the BMP writer
|
|
dimensions:
|
|
width: 101
|
|
height: 64
|
|
|
|
- platform: snapshot
|
|
id: snapshot_rotated
|
|
rotation: 90
|
|
dimensions: 320x240
|
|
lambda: |-
|
|
it.filled_rectangle(0, 0, 40, 20, Color(0xFF, 0x80, 0x00));
|
|
|
|
esphome:
|
|
# A name of your own is only good for one snapshot - a second one under the same name fails
|
|
# rather than writing over the first - so these run once rather than on a repeating interval.
|
|
on_boot:
|
|
- delay: 2s
|
|
- snapshot.take:
|
|
id: snapshot_display
|
|
filename: test_card.bmp
|
|
- snapshot.take:
|
|
id: snapshot_rotated
|
|
filename: !lambda 'return "rotated.bmp";'
|
|
- snapshot.take:
|
|
id: snapshot_display
|
|
filename: animation.gif
|
|
frames: 5
|
|
frame_rate: 10fps
|
|
|
|
interval:
|
|
# A generated name has the time in it, so this one can repeat.
|
|
- interval: 10s
|
|
then:
|
|
- snapshot.take: snapshot_display
|