fix(ui): use the Alexa name or entity ID as card title when a device has no name #5

Merged
mkrieger merged 1 commit from fix/compact-card-names into main 2026-10-26 15:43:58 +00:00
Owner

Description

Fixes the titles of the compact device cards. The card repeated the Alexa name as a badge when it was the same as the device name, and entities without a device (for example groups) showed an empty bold title. The title is now the device name, otherwise the Alexa name, otherwise the entity ID. The entity ID stays below it as a small line unless it is the title itself.

Also adds a German changelog (CHANGELOG.de.md) with all entries translated and links the two changelog files.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test update

Changes Made

  • New optional column property titleRank in SortableTable: the first column with a value (lowest rank first) is the card title, the column with the highest rank is shown small below it
  • Ranks in createTableHeaders: device name 1, Alexa name 2, entity ID 3
  • Badges that repeat the title (ignoring case) are left out of the card
  • CompactCard and getChip rewritten for this; the desktop table is unchanged
  • Rewritten tests for the compact card: device name as title, Alexa name as title, entity ID as title, duplicate Alexa name hidden, columns without a rank, switches and images skipped
  • Changelog entry 1.0.34 and a new German changelog CHANGELOG.de.md, linked from CHANGELOG.md
  • Version bump to 1.0.34

Closes #

Testing

  • Tests pass locally
  • Added new tests for new functionality
  • Updated existing tests
  • Manual testing performed

Unit tests run with 100 % coverage. Checked manually with a device entry (Abstellraum, Alexa name identical to the device name) and an entity without a device (light.gruppe_eingang): the first no longer shows the duplicate badge, the second shows its Alexa name as the title and the entity ID below it.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

Home Assistant shows only the English README.md, DOCS.md and CHANGELOG.md in the add-on pages and cannot switch the language; the German files are linked and available in the repository. After the merge, tag v1.0.34 on main.

## Description Fixes the titles of the compact device cards. The card repeated the Alexa name as a badge when it was the same as the device name, and entities without a device (for example groups) showed an empty bold title. The title is now the device name, otherwise the Alexa name, otherwise the entity ID. The entity ID stays below it as a small line unless it is the title itself. Also adds a German changelog (`CHANGELOG.de.md`) with all entries translated and links the two changelog files. ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [x] Test update ## Changes Made - New optional column property `titleRank` in `SortableTable`: the first column with a value (lowest rank first) is the card title, the column with the highest rank is shown small below it - Ranks in `createTableHeaders`: device name 1, Alexa name 2, entity ID 3 - Badges that repeat the title (ignoring case) are left out of the card - `CompactCard` and `getChip` rewritten for this; the desktop table is unchanged - Rewritten tests for the compact card: device name as title, Alexa name as title, entity ID as title, duplicate Alexa name hidden, columns without a rank, switches and images skipped - Changelog entry 1.0.34 and a new German changelog `CHANGELOG.de.md`, linked from `CHANGELOG.md` - Version bump to 1.0.34 ## Related Issues Closes # ## Testing - [x] Tests pass locally - [x] Added new tests for new functionality - [x] Updated existing tests - [x] Manual testing performed Unit tests run with 100 % coverage. Checked manually with a device entry (`Abstellraum`, Alexa name identical to the device name) and an entity without a device (`light.gruppe_eingang`): the first no longer shows the duplicate badge, the second shows its Alexa name as the title and the entity ID below it. ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings or errors - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published ## Screenshots (if applicable) <!-- Optional: card before and after the fix (Abstellraum, light.gruppe_eingang) --> ## Additional Notes Home Assistant shows only the English `README.md`, `DOCS.md` and `CHANGELOG.md` in the add-on pages and cannot switch the language; the German files are linked and available in the repository. After the merge, tag `v1.0.34` on `main`.
fix(ui): use the Alexa name or entity ID as card title when a device has no name
All checks were successful
CI / Lint (pull_request) Successful in 15s
CI / Test (pull_request) Successful in 1m27s
CI / Build (pull_request) Successful in 29s
CI / Docker Build (pull_request) Has been skipped
Code Quality / Code Quality Checks (pull_request) Successful in 32s
Code Quality / Security Audit (pull_request) Successful in 10s
Code Quality / Bundle Size Check (pull_request) Successful in 25s
CI / E2E Tests (pull_request) Successful in 3m1s
c17ac4f532
mkrieger deleted branch fix/compact-card-names 2026-10-26 15:43:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mkrieger/alexa_share!5
No description provided.