Files
esphome/tests/components/snapshot/common.yaml
T

35 lines
943 B
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";'
interval:
# A generated name has the time in it, so this one can repeat.
- interval: 10s
then:
- snapshot.take: snapshot_display