Skip to content

Additions to LVGL Display Rotation #6476

@johnben345

Description

@johnben345

Feedback

Under LVGL Graphics -> Main Configuration -> Display Rotation, it might be worth mentioning that any custom calibration values should be reset to match the physical panel dimensions in it's original orientation, as they may not match any rotation operations done with LVGL.

URL

https://esphome.io/components/lvgl/#display-rotation

Additional information

I have an M5Stack Tab5 which had it's touchscreen component containing a calibration config entry to match the rotation along with the display rotation. after the latest release (2026.4.0) I had to make the additional following changes to the component.

Before:

touchscreen:
  - platform: ...  
    transform:
      swap_xy: true
      mirror_x: true
      mirror_y: false
    calibration:
      x_min: 0
      x_max: 1280
      y_min: 0
      y_max: 720

display:
  - platform: mipi_dsi
    id: lcd
    dimensions:
      height: 1280
      width: 720
    rotation: 270
    model: ...
    reset_pin:
      ...

After:

touchscreen:
  - platform: ...  
    transform:
      swap_xy: false
      mirror_x: false
      mirror_y: false
    calibration:
      x_min: 0
      x_max: 720
      y_min: 0
      y_max: 1280

display:
  - platform: mipi_dsi
    id: lcd
    dimensions:
      height: 1280
      width: 720
    model: ...
    reset_pin:
      ...

lvgl:
  rotation: 270

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions