Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.

fix: keep the card working while the switch is not ready - #5

Merged
eizedev merged 4 commits into
mainfrom
fix/review-findings
Oct 30, 2026
Merged

eizedev merged 4 commits into
mainfrom
fix/review-findings

Conversation

@eizedev

@eizedev eizedev commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes from a neutral review before the first release (0.1.0):

  • Loading: the card keeps its last picture when a read fails, retries after 15 seconds and reads the ports again when the switch's entities come back (Home Assistant restart, switch set up again). Answers for a switch the card no longer shows are ignored. The logic is in src/loader.ts with tests.
  • Errors a user can fix are explained: integration older than 0.2.0 (unknown_command), device not a loaded switch (not_found).
  • A link without a known speed is blue instead of green; the port description no longer reads "undefined Mbit/s".
  • PoE states via Home Assistant's formatEntityState (user's language); the PoE total is a button and hidden without values.
  • Port names are shortened like device names; screen readers get the description with commas; the card is listed once in the picker; one set of words for card and dialog; card height from its rows.

Checked and left as is: ha-form keeps keys it does not show (layout survives the dialog; frontend ha-form.ts merges ...this.data), and artifact-metadata: write is required by actions/attest (its README).

Docs: the card page in ha-managed-switch is updated in eizedev/ha-managed-switch#18.

Test plan

  • npm run typecheck, npm test (21 tests), npm run build pass
  • Looked at the card in the demo instance, light and dark theme — not yet for this change
  • Texts in English and German
  • CHANGELOG.md, README and the card page in ha-managed-switch updated

🤖 Generated with Claude Code

eizedev and others added 4 commits October 30, 2026 17:07
- Keep the last answer when a read fails, retry after 15 seconds, read again when the switch's
  entities come back; ignore answers for a switch the card no longer shows.
- Explain an integration that is too old or a device that is not a loaded switch.
- A link without a known speed is blue, not green; PoE states in the user's language.
- PoE total is a button and hidden without values; port names shortened; screen readers get
  the port description with commas.
- One set of words for card and dialog; the card is listed once in the picker.
- Card height from its rows; loader tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HACS installs a plugin from its latest release. Without one the check fails, and since the
release workflow runs the same checks, the first release could never be made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TypeScript 7 no longer includes every @types package by itself (dependabot #4 failed with
TS2591 in test/release-notes.test.ts); naming them works with 5 and 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eizedev
eizedev merged commit 57e3d39 into main Oct 30, 2026
3 checks passed
@eizedev
eizedev deleted the fix/review-findings branch October 30, 2026 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant