Skip to content

Releases: skavan/super-text-input

v0.3.28

Choose a tag to compare

@skavan skavan released this 15 Jul 17:30

Added MIT LICENSE file to satisfy HACS validation (check-license). No code changes.

0.3.27

Choose a tag to compare

@skavan skavan released this 25 Jun 18:49

v0.3.27

Fixed

  • Button tap_action with {{ value }} now uses the live input value (issue #5). Previously the click handler read this._element.value — the Lit reactive property, which only updates after Home Assistant pushes the entity state back. With update_mode: blur (default), the button click triggers blur → service-call → HA round-trip, but the click handler runs before that round-trip completes, so {{ value }} substituted the stale previous value (or empty string on first use). The handler now reads from the live DOM <input> element instead, so whatever the user just typed comes through correctly.
  • {{ value }} substitution is also now safe for special characters. The old path did JSON.stringify(actionConfig).replace(...).JSON.parse(...) — typing " or \ would silently break the JSON roundtrip and the action would fire with garbage or not fire at all. The substitution now walks the action config object and only touches string leaves, so any character is preserved verbatim.

v0.3.26

Choose a tag to compare

@skavan skavan released this 25 Jun 18:21

Fixed

  • Compact button icons now center correctly inside ha-button. ...

Fixed config ui to catchup with codebase

Choose a tag to compare

@skavan skavan released this 29 May 22:49

What's new in v0.3.22

Editor (visual config) overhaul

The whole config dialog was broken in HA 2026.4+ — HA replaced the underlying ha-textfield, ha-select, and ha-selector-boolean components. This release rewires the editor to use their replacements.

  • All text fields (Name, Label, Placeholder, Update Frequency) now render correctly
  • Update Mode dropdown shows + accepts both options
  • Update Mode defaults to "On Blur" when unset (matches card behavior)
  • "Debounce Time" relabeled to "Update Frequency (ms)"
  • Two new switches hoisted from YAML to the form: Hide Label and Compact Buttons

Internal

  • Forward-compat hardening around HA 2026.4 wa-input internals (see Forward-compat notes)
  • See CHANGELOG.md for the per-version detail

v0.3.18

Choose a tag to compare

@skavan skavan released this 29 May 21:37

v0.3.18

Fixed

  • Regression from v0.3.17: the isConnected check in _injectCompactButtonStyles ran on synchronously-created buttons before they were attached to the DOM, so the inject bailed and the hover overlay reverted to a 50 % circle. Now only checks isConnected on retries (depth > 0).

v0.3.17 — Code review pass

Fixed

  • _injectCompactButtonStyles no longer leaks CSSStyleSheet instances on each setConfig. The sheet is cached on the button host (button._stiOuterSheet / button._stiInnerSheet) and reused via replaceSync, mirroring the waInput._stiSheet pattern.
  • tryInject retry chain now cancels in-flight timers and respects isConnected on retries, preventing orphaned chains from running on detached buttons after rapid setConfig calls.
  • _applyDeepInputStyles uses a per-instance version token so two rapid config changes can't race each other's writes to adoptedStyleSheets.

Changed

  • Underscored YAML style keys (padding_left) are normalized to hyphens (padding-left) once at config-load time. Every downstream reader now sees one canonical form.
  • _applyOuterInputStyles only runs when _config changes (was running on every keystroke in realtime mode).
  • Added FORWARD-COMPAT comments at the three brittle wa-input touchpoints (label.label, [part="base"]::after, ha-button::after) so future maintainers know which selectors break first when HA bumps.

v0.3.16

Added

  • Hover/ripple overlay now follows the button's border-radius. A button with border-radius: 12 px gets a rounded-rect hover instead of a circle. Implemented by overriding ha-button::after and ::before in the inner shadow.

v0.3.15

Added

  • style.editor.vertical-align (top / center / bottom, also accepts middle). Defaults to bottom (classic look, value text just above the underline). Useful for slim / hide_label cards where the value should sit in the middle of the pill.
  • The button's border-radius now propagates into the inner ha-button shadow so the visible shape and the hover bounds are consistent in size (shape correction in v0.3.16 finished the job).

v0.3.14

Added

  • Buttons under 48 px auto-trigger the inner-button shrink, so the hover overlay matches the visible button (was always 48 px before). compact_buttons: true continues to force this for all buttons regardless of size.

v0.3.13

Changed

  • Editor padding-left and padding-bottom defaults are now independent of hide_label. Toggling hide_label no longer shifts the value text horizontally or away from the underline.

v0.3.10 – v0.3.12 — HA 2026.4 compatibility

Added

  • Detect ha-input (HA 2026.4+) vs. ha-textfield (legacy) at module load and style each path appropriately.
  • compact_buttons card-level flag for slim layouts.
  • New style keys: line-color, line-gap, label-color, label-font-size, label-font-weight, label-line-height, label-padding-{top,right,bottom,left}, placeholder-color, padding-{top,right,bottom,left}, border-color, border-width.
  • Built-in button templates: clear, toast, more-info.
  • Inner <div id="sti-inner"> wrapper so card padding can inset the buttons and editor properly instead of smashing them against the card edge.

Fixed

  • iPhone keyboard close in realtime mode (issue #1) — solved by rendering the input via a real Lit template so the DOM node is reconciled across re-renders.
  • Space key not registering (issue #2) — same root cause as #1.
  • Card layout collision when both leading and trailing buttons were present.
  • Button size config is now honoured on HA 2026.4+ (the old code relied on --mdc-icon-button-size, which the new ha-icon-button ignores).