Skip to content

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Jun 11, 2025

Proposed change

Display full error in the error card when going to edit mode.
Quick fix for #25613

CleanShot 2025-06-11 at 11 24 34

For now we have 2 types of errors :

  • the ones throw by the editor
  • the ones throw by the card itself

I first tried to merge them but it was not possible because in many cases, errors were duplicated.
So I prefer to keep the previous behavior.

We should think about a better error management for error card and provide API for built-in card and custom card to provide different types of errors :

  • the parameter doesn't exist
  • the parameter is not compatible with the editor
  • some warning about the card

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

Additional information

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:

@piitaya piitaya requested a review from MindFreeze June 11, 2025 09:39
@piitaya piitaya added this to the 2025.6 milestone Jun 11, 2025
@piitaya piitaya mentioned this pull request Jun 11, 2025
9 tasks
@MindFreeze MindFreeze merged commit d542b52 into dev Jun 11, 2025
16 checks passed
@MindFreeze MindFreeze deleted the display_complete_error_preview_mode_card branch June 11, 2025 10:04
MindFreeze pushed a commit that referenced this pull request Jun 12, 2025
Assist Chat: handle intent progress delta not always being there (#25730)

handle intent progress data type change

More support for no-grid energy dashboard (#25644)

* More support for no-grid energy dashboard

* Update src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* lint

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

Z-Wave: apply sentence-style capitalization (#25739)

Display full error for card preview mode (#25747)

Fix edit card not working in chrome after editing (#25751)

Change backup type order (#25759)

Fix alerts refresh on device page (#25748)

* Fix alerts refresh on device page

* don't reset actions periodically

* reset stuff only on deviceId change

Ensure grid options always return an object (#25760)
MindFreeze added a commit that referenced this pull request Jun 23, 2025
* Handle ZWaveJS device delete in frontend according to status

* finishing touches

* Fix custom value selected when clicking item in combo box (#25734)

* Assist Chat: handle intent progress delta not always being there (#25730)

handle intent progress data type change

* More support for no-grid energy dashboard (#25644)

* More support for no-grid energy dashboard

* Update src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* lint

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* Z-Wave: apply sentence-style capitalization (#25739)

* Display full error for card preview mode (#25747)

* Fix edit card not working in chrome after editing (#25751)

* Change backup type order (#25759)

* Fix alerts refresh on device page (#25748)

* Fix alerts refresh on device page

* don't reset actions periodically

* reset stuff only on deviceId change

* Ensure grid options always return an object (#25760)

Assist Chat: handle intent progress delta not always being there (#25730)

handle intent progress data type change

More support for no-grid energy dashboard (#25644)

* More support for no-grid energy dashboard

* Update src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* lint

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

Z-Wave: apply sentence-style capitalization (#25739)

Display full error for card preview mode (#25747)

Fix edit card not working in chrome after editing (#25751)

Change backup type order (#25759)

Fix alerts refresh on device page (#25748)

* Fix alerts refresh on device page

* don't reset actions periodically

* reset stuff only on deviceId change

Ensure grid options always return an object (#25760)

* fix merge issue

* lint

* Update text and buttons

* Update src/translations/en.json

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* update text

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com>
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
Co-authored-by: Norbert Rittel <norbert@rittel.de>
@@ -200,6 +222,7 @@ export class HuiCard extends ReactiveElement {
this._element.preview = this.preview;
// For backwards compatibility
(this._element as any).editMode = this.preview;
fireEvent(this, "card-updated");
Copy link
Member

Choose a reason for hiding this comment

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

@piitaya could this be causing home-assistant/core#146799 ?

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.

setConfig errors are not being shown
2 participants