This is some commented out code were I had data cycling through a small OLED screen. Pages changed automatically every 5 seconds. Had a temperature and humidity sensor, also printed a timestamp. The last 2 lines is what makes it cycle from page to page. Just download the font files you want to use. I believe you need at least one. It doesn’t have any default font. The files below are in /config/ESPHome/fonts on my HA server
#font:
# - file: "fonts/Roboto-Bold.ttf"
# id: tnr2
# size: 54
# - file: "fonts/Insominia.ttf"
# id: tnr3
# size: 64
# - file: "fonts/arial.ttf"
# id: tnr1
# size: 56
# - file: "fonts/Times New Roman.ttf"
# id: tnr4
# size: 51
# - file: "fonts/Roboto-Bold.ttf"
# id: tnr5
# size: 50
# - file: "fonts/Times New Roman.ttf"
# id: tnr6
# size: 50
# - file: "fonts/Roboto-Bold.ttf"
# id: tnr7
# size: 48
# - file: "fonts/arial.ttf"
# id: tnr8
# size: 12
# - file: "fonts/Roboto-Bold.ttf"
# id: tnr9
# size: 34
# - file: "fonts/Roboto-Bold.ttf"
# id: tnr10
# size: 38
#
#
#display:
# - platform: ssd1306_i2c
# model: "SSD1306 128x64"
# id: my_display
# address: 0x3C
# rotation: 0°
# pages:
# - id: page1
# lambda: |-
# if (id(temperature_ig88).has_state()) {
# it.printf(64, 54, id(tnr2), TextAlign::BASELINE_CENTER, "%.1f°", id(temperature_ig88).state);
# }
# - id: page2
# lambda: |-
# if (id(humidity_ig88).has_state()) {
# it.printf(64, 56, id(tnr3), TextAlign::BASELINE_CENTER, "%.1fH", id(humidity_ig88).state);
# }
# - id: page3
# lambda: |-
# if (id(pressure_ig88).has_state()) {
# it.printf(2, 36, id(tnr5), TextAlign::BASELINE_LEFT, "%.0f", id(pressure_ig88).state);
# it.print(6, 58, id(tnr8), TextAlign::BASELINE_LEFT, "barometric pressure");
# }
# - id: page4
# lambda: |-
# if (id(temperature_ig88).has_state()) {
# it.strftime(64, 48, id(tnr4), TextAlign::BASELINE_CENTER, "%H:%M", id(estime).now());
# }
# - id: page5
# lambda: |-
# if (id(temperature_ig88).has_state()) {
# it.printf(64, 52, id(tnr1), TextAlign::BASELINE_CENTER, "%.1f°", id(temperature_ig88).state);
# }
# - id: page6
# lambda: |-
# if (id(humidity_ig88).has_state()) {
# it.printf(64, 48, id(tnr4), TextAlign::BASELINE_CENTER, "%.1fH", id(humidity_ig88).state);
# }
# - id: page7
# lambda: |-
# if (id(pressure_ig88).has_state()) {
# it.print(8, 10, id(tnr8), TextAlign::BASELINE_LEFT, "barometric pressure");
# it.printf(64, 48, id(tnr10), TextAlign::BASELINE_CENTER, "%3.1f", id(pressure_ig88).state);
# }
# - id: page8
# lambda: |-
# if (id(temperature_ig88).has_state()) {
# it.strftime(64, 56, id(tnr3), TextAlign::BASELINE_CENTER, "%H:%M", id(estime).now());
# }
#
## For example cycle through pages on a timer
#interval:
# - interval: 5s
# then:
# - display.page.show_next: my_display
# - component.update: my_display