Update 2026.6 broken all my CYDs again

That's the problem - the ili9341 has a width of 240 and a height of 320, i.e. it is natively portrait mode. Leave the dimensions and transform blocks out, and use rotation: 90 in the LVGL config if using LVGL, or in the display config if not.

What you were doing before has been broken because the driver is now capable of doing runtime hardware rotation (previously that was not possible) and for that to work, the configuration has to start with the correct native dimensions representing the actual number of column and row drivers.

It is possible to fully override the dimensions by using the offset and pad config options, but unless you have a custom display there's no need to do that - just let the display be what it wants to be and use rotation to get the presentation you want.

  • previously the ili9341was set as 320x240, while since latest version it is 240x320
  • Also the rotation (and related) has changed from previous version
  • and the important thing, is that those changes are NOT handled the same, depending if you use it in LVGL mode, or not (ie it.printf(xxx) in lambda)

I've documented some cases, in the (above) GH issue, and i encourage you all to test , ensure my report did not suffer from any copy/paste error, confirm it, and maybe add additionnal examples depending on your own rotation + display mode (LVGL or not)

The more the dev get info, the faster , they will surely fix the bug

The changes actually do ensure that rotation is handled the same way, by using the display hardware rotation rather than software. The only difference is whether it's configured in LVGL or the display config - if LVGL is in use it needs to be able to control the display rotation so you don't also configure it in in the display.

Please carefully read my examples in the GH issue: (again i might have made copy/paste errors... my bad in this case)

but from 2026.6.1:

  • dimensions have been swapped from 320x240 to 240x320. OK let say it now complies with the datasheet, despite it has NOT been documented, while it is a BREAKING change
  • LVGL has to be rotated 90° (from "lvgl:") to get a portrait view, (total non sense!)
  • non LVGL has to be be rotated 90° (from "display:") to be in landscape mode (sounds OK!).

Do you smell the bug and related confusion ? :wink:

That's not correct, the ili9341 mipi_spi model has always been 240x320, and it will appear in portrait mode whether using LVGL or not, unless rotation is specified.

I see in the issue you raised that your original config was using both transform and rotation which is not recommended and is probably the source of your confusion, combined with the recent changes.

It will be possible to "fix" things so that a config like that would still work, but if the recommended practice had been followed (i.e. just using rotation) you wouldn't have noticed any change other than the need to move the rotation key from display to LVGL.

My code is also broken with ESPHome 2026.6.2

This is what has always worked:

    dimensions:
      height: 240
      width: 320
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: false

The documentation said that "rotation: 90" uses software and instead of using "rotation: 90" to use "swap_xy" which uses hardware.

Is that no longer true?

The mipi_spi documentation does not say that and never has. What it says is:

  • rotation (Optional): Rotate the display presentation in software. Choose one of , 90°, 180°, or 270°. If the driver chip supports hardware rotation for the given orientation this will be translated to the appropriate hardware command. If hardware rotation is not supported, the display will be rotated in software.

The first sentence should be updated to drop the "in software" but it's clearly explained in that paragraph that hardware rotation is done if possible.

That is mathematically impossible: swapping x and y is a reflection around the diagonal y=x line, which isn't the same as a 90° rotation. If you also mirror x after the swap, then it would be.

@clydebarrow I did the code and the comments a long time ago. I may have interpreted the documentation incorrectly. The code always worked until now.

@parautenbach You are correct. I documented in my code "use swap_xy with mirror_x " but that did not work. When I set "mirror_x: false", it worked so I left it like that.

What I suspect is that there were more changes to display mipi_spi than were documented in the release notes. I am happy to change my code so that it works correctly with the latest release. It was just unexpected.

With the original code using ESPHome 2026.6.2, got the error "Invalid offsets."

dimensions:
      height: 240
      width: 320
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: false

Added the offsets and that fixed the error.

    dimensions:
      height: 240
      width: 320
      offset_width: 0
      offset_height: 0
      pad_width: 0
      pad_height: 0
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: false

Log output of the above:

[14:04:20.763][C][display.mipi_spi:010]:   Width: 320
[14:04:20.763][C][display.mipi_spi:010]:   Height: 240
[14:04:20.763][C][display.mipi_spi:010]:   Swap X/Y: NO
[14:04:20.763][C][display.mipi_spi:010]:   Mirror X: YES
[14:04:20.763][C][display.mipi_spi:010]:   Mirror Y: NO
[14:04:20.763][C][display.mipi_spi:010]:   Hardware rotation: YES
[14:04:20.770][C][display.mipi_spi:542]:   Rotation: 90°

Removed all the dimensions and transform code and used only:

    rotation: 90

Log output using only "rotation: 90":

[14:09:32.596][C][display.mipi_spi:010]:   Width: 320
[14:09:32.596][C][display.mipi_spi:010]:   Height: 240
[14:09:32.596][C][display.mipi_spi:010]:   Swap X/Y: NO
[14:09:32.596][C][display.mipi_spi:010]:   Mirror X: YES
[14:09:32.596][C][display.mipi_spi:010]:   Mirror Y: NO
[14:09:32.596][C][display.mipi_spi:010]:   Hardware rotation: YES
[14:09:32.623][C][display.mipi_spi:542]:   Rotation: 90°

End result is the same. It is working.