Motivation
The card injects its version at build time (__VERSION__ via Vite) but never
surfaces it: nothing is logged on load and there is no debug switch. Diagnosing
user reports means guessing which build is running. pollenprognos-card solves
this with an Advanced editor section (version + debug toggles) and a styled
console banner; sauna-card should match.
Proposal
Add an Advanced section to the card and badge editors, a <details> folded
by default, placed last. It holds two toggles:
- Log version to console (
show_version, default ON) — prints a styled
%c banner with the build version once per instance on first setConfig.
- Debug (
debug, default OFF) — enables verbose console.debug logging
across adapter detection, service calls, and graph/session computation.
The section also shows the current build version as a formatted readout
(Sauna Card version: X.Y.Z).
Because existing instances have no show_version key, the banner guard is
show_version !== false (absent ⇒ on), so old YAML keeps logging the version.
Editor UX
Folded <details class="section"> at the bottom of both editors, reusing the
existing manual-section fold styling. Two ha-formfield + ha-switch toggles
(switches reflect default-true correctly, unlike an ha-form boolean). To keep
YAML clean, only persist non-default values: store show_version: false only
when toggled off, debug: true only when toggled on. A version line renders
below the toggles.
Acceptance criteria
Motivation
The card injects its version at build time (
__VERSION__via Vite) but neversurfaces it: nothing is logged on load and there is no debug switch. Diagnosing
user reports means guessing which build is running.
pollenprognos-cardsolvesthis with an Advanced editor section (version + debug toggles) and a styled
console banner; sauna-card should match.
Proposal
Add an Advanced section to the card and badge editors, a
<details>foldedby default, placed last. It holds two toggles:
show_version, default ON) — prints a styled%cbanner with the build version once per instance on firstsetConfig.debug, default OFF) — enables verboseconsole.debugloggingacross adapter detection, service calls, and graph/session computation.
The section also shows the current build version as a formatted readout
(
Sauna Card version: X.Y.Z).Because existing instances have no
show_versionkey, the banner guard isshow_version !== false(absent ⇒ on), so old YAML keeps logging the version.Editor UX
Folded
<details class="section">at the bottom of both editors, reusing theexisting manual-section fold styling. Two
ha-formfield+ha-switchtoggles(switches reflect default-true correctly, unlike an
ha-formboolean). To keepYAML clean, only persist non-default values: store
show_version: falseonlywhen toggled off,
debug: trueonly when toggled on. A version line rendersbelow the toggles.
Acceptance criteria
show_versiondefaults ON; absent-in-YAML instances still log the banner.%c-styled and printed once per instance (no spam on re-render).show_versionoff suppresses the banner; reflected in YAML only when false.debugdefaults OFF; turning it on emitsconsole.debugfrom instrumented paths.__VERSION__, badge variant reads "Badge".show_version: falsesuppresses.