hui-error-badge.ts:22 TypeError: Cannot read properties of undefined (reading 'entity_id')
at o (typography.js:181:1)
at 62012e21.js:1:13284
at Array.sort (<anonymous>)
at 62012e21.js:1:13256
at Array.forEach (<anonymous>)
at f (62012e21.js:1:13226)
at m (62012e21.js:1:14107)
at y.generateView (62012e21.js:1:15164)
at async o (hui-error-badge.ts:22:1)
at async r.value (hui-masonry-view.ts:44:1)
However when reloading the page, it is shown just fine so that is what I do.
Using HA2022.10.5
I went in dev mode also to disable caching, did CTRL+F5, etc, have made several HA updates since this started happening, etc.
I tried in private navigation - no issue.
So I went in DeveloperTools/Cache Storage and deleted al of the caches manually using the delete icon. Then it is sometimes ok, but still fails on some changes.
EDIT: just reproduced it in private mode as well.
EDIT2: The overview is still the automatically generated page. When I want to edit it, HA shows the popup " Take control of your dashboard".
View? there is no userconfiguration file for the view because it is generated - I could possibly try to edit it and hopefully it stays automatic as long as it is not saved.
Hi. I am getting the exact same error message showing in the first post. It has been awhile and I never gotten around to fix as as I don’t know where to start. After a reboot, I get this error when viewing my overview page. A reload of the page fixes, but it is just a bandage fix.
I know what is causing the error, but I don’t know why. See below update.
Update: I figured out why it is throwing the error, but I don’t know how to fix it. It seems the additional dashboard I have created (Floorplan) is causing the error when viewing the overview page. It does not happen after a restart of HA; It happens whenever I click on the floorplan page and back to overview page.
lovelove.yaml:
dashboards:
lovelace-floorplan: # url slug need to contain a hyphen
mode: yaml
filename: lovelace/dashboards/floorplan/ui-floorplan.yaml
title: Floorplan
icon: mdi:view-dashboard
show_in_sidebar: true
require_admin: false
floorplan.yaml: With these codes alone, I receive the error. If I have a blank page with no codes save, no errors.
Excellent find! It does seem that the floorplan is involved, so this can be reported to the floorplan project.
In my case, I can always return to the automatically generated page unless I visited the floorplan page.
So the floorplan page is likely changing data also used by the “automatic” page.
This image illustrates why the code is generating an exception, but not why “entities” contains ‘’.
The code fails here because it tries to find “sensor.16996282-911ec145” in the ‘entities’. And all entities except '’ are indexed by their entity_id. So entities["sensor.16996282-911ec145"] is undefined while the code expects it return the entity details.
When the floorplan was not visited, this ‘’ key does not exist in ‘entities’ and the issue does not occur. So the floorplan is adding the '’ entry somewhere while it should add entities[“sensor.16996282-911ec145”] (entities seems to be from hass.entities).