Help! Display graph on Waveshare 2.9 ePaper

Help Needed…

I am trying to take data (energy useage) and plot it on ePaper using ESPhome… I have been trying to follow the ESPhome Display Component documentation… but failing miserably.


  • platform: waveshare_epaper
    cs_pin: D2
    dc_pin: D6
    busy_pin: D7
    reset_pin: D5
    model: 2.90inv2
    id: mydisplay
    update_interval: 1s
    full_update_every: 240
    rotation: 90

Show bare-minimum auto-ranged graph

  • id: single_graph
    sensor: watts
    duration: 1h
    width: 151
    height: 51
    lambda: |-
    // Draw the graph at position [x=10,y=20]
    it.graph(10, 20, id(single_graph));
    Error: mapping values not allowed here (lambda)

Show your code properly please.

How is it failing?