Skip to content

Move to py-opendisplay 8 - #161

Merged
g4bri3lDev merged 4 commits into
mainfrom
feat/dithered-preview
Nov 12, 2026
Merged

g4bri3lDev merged 4 commits into
mainfrom
feat/dithered-preview

Conversation

@g4bri3lDev

Copy link
Copy Markdown
Member

Moves the integration to py-opendisplay 8.1.0, which uses epaper-dithering 7.

Changes

Empty tone compression now means none. epaper-dithering 7 has no automatic tone mapping. Leaving tone_compression empty on upload_image or drawcustom now sends 0.0 instead of "auto". Photos come out somewhat more contrasty than with the old automatic fit. Set a percentage to compress. The field help says so in every language.

drawcustom accepts dither names only (breaking). DitherMode is a string enum in py-opendisplay 8. The numeric values (0/1/2) kept for pre-3.0 configs are dropped. Use none, burkes, ordered and so on.

The display content image shows the dithered frame. The image entity used to show the source image. It now shows what the panel shows: the dithered frame in the palette's colours, turned back to the source orientation with py-opendisplay's new preview_image. A drawcustom dry run dithers too, so its preview matches a real send. With refine dithering on, a dry run takes as long as a real dither.

drawcustom uses measured palettes by default. In epaper-dithering 7, pure nominal colours snap to their ink, so dashboard colours come out as solid inks with measured palettes on or off; the wire bytes are identical. On now only improves anti-aliased edges and images in a payload, and the preview shows the panel's real colours. services.yaml also told the UI that upload_image defaulted to off while its schema said on; both now say on.

py-opendisplay 8.1.0 is required: 8.0.1 added back ColorScheme.accent_color (drawcustom's accent colour) and 8.1.0 added preview_image.

Release order with OpenEPaperLink

py-opendisplay 8 pins epaper-dithering==7.0.0. OEPL v3.0.0 pins py-oepl[dither]==0.13.1 and py-atc-ble-oepl==0.9.0, and both need epaper-dithering<7. Someone running both integrations would end up with whichever version installed last, and the other integration fails to import. OEPL needs its release on py-oepl 1.0.0 / py-atc-ble-oepl 1.0.0 (both on epaper-dithering 7) out before or with this one.

Testing

  • Unit tests: 251 passed. New tests cover empty and percentage tone on both actions, and that the preview (live upload and dry run) is the dithered frame.

  • On a Spectra 6 7.3" device (OD216205, firmware 2.27.0) in a dev Home Assistant:

    • drawcustom with accent elements;
    • a photo from Immich with tone empty and at 50 %;
    • refine dithering;
    • a drawcustom dry run at rotate: 90;
    • measured palettes on and off.

    All were delivered, and each preview matched the dithered frame, the right way up.

py-opendisplay 8 uses epaper-dithering 7, which has no automatic tone
mapping. An empty tone_compression now means no compression (0.0) instead
of "auto"; the field help says so in every language.

DitherMode is a string enum in py-opendisplay 8, so drawcustom no longer
accepts the numeric dither values (0/1/2) kept for pre-3.0 configs; use the
names. Requires py-opendisplay 8.0.1, the first release with
ColorScheme.accent_color, which drawcustom passes to odl-renderer.

BREAKING CHANGE: drawcustom's dither field accepts only names (none, burkes,
ordered, ...); numeric values fail validation.
The image entity showed the source image. It now shows the frame as the
panel shows it: the dithered image in each palette entry's appearance,
turned back to the source orientation with py-opendisplay's preview_image.
A drawcustom dry run dithers too, so its preview matches a real send.
drawcustom defaulted to measured palettes off. With epaper-dithering 6 a
measured palette dithered pure dashboard colours against the measured inks,
so solid #ff0000 text came out speckled; off kept dashboards clean.

epaper-dithering 7 palettes name each ink with its nominal colour, and pure
nominal colours snap to their ink before dithering. Dashboard colours now
come out as solid inks with measured palettes on or off: the wire bytes are
identical, which was checked offline and on a Spectra 6 device (OD216205).

So on is now strictly better for drawcustom: anti-aliased edges and images
in a payload dither against the inks the panel really has, and the preview
shows the panel's real colours. The setting still exists to turn it off.

services.yaml also told the UI the default was off for upload_image, whose
schema already defaulted to on; both services now say on in both places.
@g4bri3lDev
g4bri3lDev merged commit 3db7367 into main Nov 12, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant