Skip to content

Make card error message available to cards loaded by card helpers. #26064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

dcapslock
Copy link

Breaking change

Proposed change

With 2025.6 card error changed from being the underlying error to being generic 'Configuration error'. An update allowed for cards in edit/preview mode to see the underlying card error message. This change did not account for cards loaded by card helpers. This PR adds the underlying card error message so it is part of hui-error-card config that is created so can be used by custom elements, and if that custom element loads a card preview, the underlying card error message will be able to be seen.

Custom Elements to benefit from this PR will be Browser Mod (Popup Card Preview) and Auto Entities (will enable a fix to current issues with > 2025.6)

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

No in the box Home Assistant test. Also I don't believe any custom elements correctly use preview, though Browser Mod has a PR to correctly show Popup card config in preview.

The YAML below is using history-graph with empty entities array to simulate an error.

type: grid
cards:
  - type: heading
    heading: Test Card Errors
    heading_style: title
  - type: history-graph
    entities: []
    grid_options:
      columns: full
  - type: custom:popup-card
    title: Custom popup
    dismissable: true
    entity: binary_sensor.ios_virtual
    card:
      type: history-graph
      entities: []

Tested with Browser Mod PR

Without this PR

Without

With this PR

With

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dcapslock

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

home-assistant bot commented Jul 4, 2025

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant