There are various entities that are only dynamically created while HA is running. For example HTTP sensors, the updater.updater
entity or some auto discovered entities. For example I have a media player that isn’t always online, thus not always discovered on HA startup. Every time I open the view in which this entity is configured in the browser, an Uncaught TypeError
is thrown in the log together with a yellow “Entity not available” box in the UI:
2018-10-17 14:40:41 ERROR (MainThread) [frontend.js.latest.201809270] https://example.org:8123/frontend_latest/app-084b7564.js:2856:640 Uncaught TypeError: Cannot read property '_stateDisplay' of null
While the classic UI more or less ignores non-existing entities configured in a view, lovelace throws an error every time it wants to display a non existent entity in a view. I don’t know, why it shows that yellow box for media players, but not for other entities like the updater, but the errors in the log are always the same.
ATM I’m not aware of any mechanism in the lovelace UI to properly deal with only temporary existing entities. Is there anything I missed?
Edit: Just saw, that the yellow box is also shown for updater.updater in v0.80.3.
At least the behavior is consistent, but I still don’t know, how to avoid these errors without entirely removing only temporary available entities from the lovelace UI.