Skip to content

Add multi-font support to countdown mode#512

Merged
JanPetterMG merged 3 commits intomainfrom
feat/countdown-multi-font
Apr 12, 2026
Merged

Add multi-font support to countdown mode#512
JanPetterMG merged 3 commits intomainfrom
feat/countdown-multi-font

Conversation

@JanPetterMG
Copy link
Copy Markdown
Collaborator

@JanPetterMG JanPetterMG commented Apr 12, 2026

This PR adds multi-font support to Countdown mode across both firmware and the web UI.

Users can now choose which supported font the countdown should use, and the selected font is exposed through the device payload, persisted in preferences, and configurable from the frontend. This also improves how the countdown behaves once it has ended.

Changes

Firmware

  • Added support for multiple countdown fonts via a static list of available font names
  • Persisted the selected countdown font in preferences
  • Added setFont() handling for validating and applying font changes
  • Included the active font and available font list in transmitted Countdown payloads
  • Added Home Assistant select discovery for countdown font selection
  • Updated countdown rendering to use the selected font dynamically instead of a fixed font
  • Reset countdown display state in begin() using blink/lower/upper values
  • Improved ended countdown handling as part of the mode update flow

Web UI

  • Added Countdown font state handling in the receiver
  • Added support for receiving both the active font and the list of available fonts
  • Added a font selector dropdown to the Countdown sidebar
  • Sent font changes back over WebSocket when a new font is selected
  • Adjusted Countdown cookie initialization for hours, minutes, and seconds

Why

This makes Countdown mode more flexible and consistent with the rest of the project by allowing the display style to be selected instead of being hardcoded. It also improves the configuration experience in both the web UI and Home Assistant.

Notes

  • The default countdown font is initialized from the first available compiled font
  • Font changes are validated against the registered font service before being saved
  • The web UI font dropdown is populated dynamically from the device-reported font list

@JanPetterMG JanPetterMG added enhancement New feature or request frontend Web app related firmware C++ related labels Apr 12, 2026
@JanPetterMG JanPetterMG added this to the v2.4.0 milestone Apr 12, 2026
@JanPetterMG JanPetterMG added enhancement New feature or request frontend Web app related firmware C++ related labels Apr 12, 2026
@JanPetterMG JanPetterMG changed the title Countdown multi-font support Add multi-font support to countdown mode Apr 12, 2026
@JanPetterMG JanPetterMG marked this pull request as ready for review April 12, 2026 15:45
@JanPetterMG JanPetterMG added this pull request to the merge queue Apr 12, 2026
Merged via the queue into main with commit c93dd94 Apr 12, 2026
199 of 203 checks passed
@JanPetterMG JanPetterMG deleted the feat/countdown-multi-font branch April 12, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request firmware C++ related frontend Web app related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant