From f8c968c5a7cd122e69500be5da7e4e35fec2d4e3 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Wed, 12 Aug 2026 22:16:43 +0200 Subject: [PATCH] fix(trmnl): render the panel in German via the schedule's lang field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lang was null, so the screenshot session rendered in English — and the dashboard grew a German weekday array, a German month array and a fifteen-entry weather-condition dict to translate around it by hand. The field is documented as "UI language code (HA mode only)" and calls Home Assistant's own _selectLanguage() on the page before capture; upstream's tests use lang: 'de'. So localisation is HA's job and the field was sitting in the schedule template, already written out, set to null because I copied the shape without asking what it did. Pairs with homeassistant#220, which deletes both hand-written mappings: the weather badge points at weather.garten directly and the date is a device_class: timestamp the frontend formats. The instance stays language "en". This affects only the render session, so the panel is German without changing anyone's UI. Co-Authored-By: Claude Opus 5 (1M context) --- kubernetes/apps/trmnl/renderer.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kubernetes/apps/trmnl/renderer.yaml b/kubernetes/apps/trmnl/renderer.yaml index 5c33db02..1625a1ca 100644 --- a/kubernetes/apps/trmnl/renderer.yaml +++ b/kubernetes/apps/trmnl/renderer.yaml @@ -29,6 +29,14 @@ data: # The app re-reads schedules.json every 60 s, so edits here take # effect without a restart once the init container has rewritten it. # + # lang is "de", not null. It calls Home Assistant's own + # _selectLanguage() for the screenshot session, so the rendered page + # is localised by HA rather than by hand. With it left null the + # dashboard grew a German weekday array, a German month array and a + # fifteen-entry weather-condition dict — reimplementing translations + # HA already ships. The instance itself stays language "en"; this + # only affects the render session. + # # model_id is 1 — TRMNL X (name "v2", 1872x1404, 16 colours) — and it # is an INTEGER, not a name. Confirmed against the running server: # GET /api/screens returns model_id as a number, and upstream's @@ -61,7 +69,7 @@ data: "zoom": 1, "wait": null, "theme": "Graphite E-ink Light", - "lang": null, + "lang": "de", "dark": false, "invert": false, "timestamp": false, -- 2.54.0