Frontend: Strange behaviors with custom cards after 0.110 update

Created on 21 May 2020  路  2Comments  路  Source: home-assistant/frontend

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.

The problem

I can see quite some issues with the latest update and custom cards because the hass object is (sometimes not always, but quite often) being assigned while still being undefined. Is this expected from lovelace?
Also sometimes the setConfig is called before the element is created.

TypeError: t.setConfig is not a function
    at /__vscode-remote-uri__/workspaces/xxxx/dist/frontend_latest/chunk.3794da5240b9979884e1.js:2140:6459

Both of those things happen only after a refresh of the page (not reload from the menu). A "reload" from the menu fixes it but it's definitely not ideal.

Expected behavior

Steps to reproduce

Environment

  • Home Assistant release with the issue: 0.110.0
  • Last working Home Assistant release (if known): 0.109.6
  • Browser and browser version: Chrome MacOS / Chrome Android
  • Operating system: MacOS / Android

State of relevant entities


Problem-relevant configuration


Javascript errors shown in your browser console/inspector


Additional information

bug

Most helpful comment

I can see that in a simple horizontal-stack also

All 2 comments

Where do you get hass before it is defined? I can see it happening in picture elements, made a fix for that. Any other place?

The setConfig issue is already fixed.

I can see that in a simple horizontal-stack also

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bmf7777 picture bmf7777  路  3Comments

Misiu picture Misiu  路  3Comments

SeanPM5 picture SeanPM5  路  3Comments

wangyt123ng picture wangyt123ng  路  3Comments

Depechie picture Depechie  路  3Comments