i2c:
  - id: i2c_ssd1306_i2c
    scl: 16
    sda: 17

display:
  - platform: ssd1306_i2c
    model: SSD1306_128X64
    reset_pin: 3
    address: 0x3C
    id: display1
    contrast: 60%
    pages:
      - id: page1
        lambda: |-
          it.rectangle(0, 0, it.get_width(), it.get_height());
      - id: page2
        lambda: |-
          it.rectangle(0, 0, 10, 10);
    on_page_change:
      from: page1
      to: page2
      then:
        lambda: |-
          ESP_LOGD("display", "1 -> 2");