Skip to content

Conversation

@mullender
Copy link

As reported in home-assistant/core#156671 there is a case in which label is not a string but an object:

{
    "TLVValue": null,
    "Reason": "InteractionModelError: Failure (0x1)"
}

This then causes an error in the rendering of the dashboard.

Ideally we would figure out where the bad data comes from. But this should fix the symptom.

get nodeLabel(): string {
const label = this.attributes["0/40/5"];
if (!label) return '';
if (!label?.includes) return '';
Copy link
Contributor

@Apollon77 Apollon77 Nov 18, 2025

Choose a reason for hiding this comment

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

Thanks for your contribution. is that suppose to check weather there is a function "includes"?

So the real solution to check for a string is

typeof label === "string"

Copy link
Author

Choose a reason for hiding this comment

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

yes that would work even better. Best solution would be to find the source of the bad data.. I can update the pull

@mullender
Copy link
Author

I updated the pull request with the suggested change

@mullender
Copy link
Author

It looks like this needs a label. Perhaps bugfix

@mullender mullender requested a review from Apollon77 November 19, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants