Repository navigation
Move to py-opendisplay 8 - #161
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_compressionempty onupload_imageordrawcustomnow 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).
DitherModeis a string enum in py-opendisplay 8. The numeric values (0/1/2) kept for pre-3.0 configs are dropped. Usenone,burkes,orderedand 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.yamlalso told the UI thatupload_imagedefaulted 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 addedpreview_image.Release order with OpenEPaperLink
py-opendisplay 8 pins
epaper-dithering==7.0.0. OEPL v3.0.0 pinspy-oepl[dither]==0.13.1andpy-atc-ble-oepl==0.9.0, and both needepaper-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 onpy-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:
rotate: 90;All were delivered, and each preview matched the dithered frame, the right way up.