From f64e7ea9111051503840f1a7cac4f4ea77d3f4f3 Mon Sep 17 00:00:00 2001 From: gabriel Date: Thu, 30 Jul 2026 15:17:13 +0200 Subject: [PATCH] feat: expose dizzy dithering in the service selectors epaper-dithering 6.0.0 added DitherMode.DIZZY (value 9), error diffusion with a pseudo-random traversal instead of a raster scan. py-opendisplay re-exports DitherMode straight from epaper_dithering, and the service schemas build their validators from the enum via _str_to_int_enum, so "dizzy" was already accepted by upload_image and drawcustom. It was just missing from the hand-maintained UI metadata, which made it invisible in the Home Assistant service picker. Add it to both select option lists in services.yaml, add the label to strings.json, and document it in the drawcustom option table. Both selectors now match DitherMode element for element in enum order. Translations regenerate from strings.json via the translate workflow. --- custom_components/opendisplay/services.yaml | 2 ++ custom_components/opendisplay/strings.json | 1 + docs/drawcustom/supported_types.md | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/opendisplay/services.yaml b/custom_components/opendisplay/services.yaml index 72b36f3..d006c59 100644 --- a/custom_components/opendisplay/services.yaml +++ b/custom_components/opendisplay/services.yaml @@ -39,6 +39,7 @@ upload_image: - "sierra" - "sierra_lite" - "jarvis_judice_ninke" + - "dizzy" refresh_mode: required: false default: "full" @@ -390,6 +391,7 @@ drawcustom: - "sierra" - "sierra_lite" - "jarvis_judice_ninke" + - "dizzy" refresh_type: name: Refresh type description: E-paper refresh mode diff --git a/custom_components/opendisplay/strings.json b/custom_components/opendisplay/strings.json index 1d291e1..3efbbe8 100644 --- a/custom_components/opendisplay/strings.json +++ b/custom_components/opendisplay/strings.json @@ -195,6 +195,7 @@ "options": { "atkinson": "Atkinson", "burkes": "Burkes", + "dizzy": "Dizzy", "floyd_steinberg": "Floyd-Steinberg", "jarvis_judice_ninke": "Jarvis, Judice & Ninke", "none": "None", diff --git a/docs/drawcustom/supported_types.md b/docs/drawcustom/supported_types.md index c91f128..8427736 100644 --- a/docs/drawcustom/supported_types.md +++ b/docs/drawcustom/supported_types.md @@ -50,7 +50,7 @@ The service targets one or more OpenDisplay devices via the standard Home Assist | `payload` | List of drawing elements (required) | — | See [Element types](#element-types) | | `background` | Background color | `white` | `white`, `black`, `accent`, `red`, `yellow` | | `rotate` | Rotation of the whole image, in degrees | `0` | `0`, `90`, `180`, `270` | -| `dither` | Dithering algorithm | `ordered` | `none`, `burkes`, `ordered`, `floyd_steinberg`, `atkinson`, `stucki`, `sierra`, `sierra_lite`, `jarvis_judice_ninke` | +| `dither` | Dithering algorithm | `ordered` | `none`, `burkes`, `ordered`, `floyd_steinberg`, `atkinson`, `stucki`, `sierra`, `sierra_lite`, `jarvis_judice_ninke`, `dizzy` | | `refresh_type` | E-paper refresh mode | `full` | `full`, `fast` | | `tone_compression` | Tone compression strength (%) | automatic | `0`–`100`; omit for automatic tone mapping | | `dry-run` | Generate the image without sending it | `false` | `true`, `false` |