Lovelace - updater broken?

After much hair pulling I have now found out that updater.updater has stopped working in Lovelace. Can anyone help me?
Thanks.


I have

updater:

in my config.yaml and my Lovelace config is;

  - type: entities
    title: System
    show_header_toggle: false
    entities:
      - updater.updater
      - sensor.current_version

And the error is:

Log Details (ERROR)

Wed Sep 12 2018 09:04:41 GMT+0100 (British Summer Time)

http://192.168.1.25:8123/frontend_latest/app-c65b4028.js:445:3536 Uncaught TypeError: Cannot read property ‘_stateDisplay’ of null


image

I think this is no particular issue with the updater component, but a generic problem with how the lovelace UI handles non existing entities.

There are various entities that are only dynamically created while HA is running. For example HTTP sensors 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, a similar 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

And updater.updater also doesn’t exist until there is an update available, causing these errors as well.

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 the updater entity, but the errors in the log are similar.

ATM I’m not aware of any mechanism in the lovelace UI to properly deal with only temporary existing entities.

1 Like

Not sure about that but can refer you to the automation I wrote which more than answer your question

1 Like