Skip to content

Generate generic label bands from explicit input scales - #38

Merged
flowcool merged 2 commits into
JGAguado:V2R1from
flowcool:publish/73-label-generator
Oct 21, 2026
Merged

flowcool merged 2 commits into
JGAguado:V2R1from
flowcool:publish/73-label-generator

Conversation

@flowcool

@flowcool flowcool commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Generate a generic e-paper label from explicit YAML without device inventory or Home Assistant data. Recommendation bands and firmware scales share one geometry contract.

example.yaml -> one-bit 296x128 PNG + ESPHome scale substitutions

This optional adaptation credits Label-maker and preserves its MIT notice. Include the generated scale package after the core; device substitutions still take precedence. Firmware source is unchanged. CI installs the pinned renderer dependencies and Cairo build tools.

Evidence

  • Before: label creation needs a separate renderer and manually aligned scales.
    After: 26 tests pass on this refreshed upstream base, with no skips. Tests execute the real firmware gauge, compare rendered endpoints, reject invalid input, check deterministic output, and exercise the ESPHome 2026.9.0 package loader.
  • The documented command generates a one-bit 296x128 PNG. Both API and MQTT schemas validate with that image and the generated scale package under ESPHome 2026.9.0.
  • Changed YAML, original line endings and whitespace checks pass. Tests use synthetic inputs; no device, broker, Home Assistant or production service was contacted.
  • The pinned renderer requirements install successfully in the isolated ESPHome environment; the documented full test command passes. GitHub CI verifies installation on Ubuntu/Python 3.12. No new hardware test is claimed.

Merge Danger

Door: two-way. Revert this optional tool and its CI dependencies; generated local files remain user-owned.

Blast Radius: tooling. No firmware deployment. Custom scales can change needle interpretation when a user later adopts the generated package.

AI assistance: Codex prepared and validated this isolated contribution. Upstream review is requested; local tests do not constitute maintainer approval.

@flowcool
flowcool requested a review from JGAguado as a code owner October 21, 2026 08:51

@JGAguado JGAguado left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to have the label bands and firmware scales come from one contract. The pinned dependencies and the MIT notice for Label-maker are fine. Approving.

@flowcool
flowcool force-pushed the publish/73-label-generator branch from 91403cc to 998270c Compare October 21, 2026 15:43
@flowcool
flowcool merged commit 0fb84e7 into JGAguado:V2R1 Oct 21, 2026
1 check passed
@flowcool
flowcool deleted the publish/73-label-generator branch October 21, 2026 15:44
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.

2 participants