Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for slow or no loading at start #115

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

Suxsem
Copy link
Contributor

@Suxsem Suxsem commented Nov 2, 2023

I always noticed that most of the time the card was initially empty and only after some time it was properly rendered. Sometimes the card wasn't rendering at all.

I spent some minutes on the code and found the issue:

let attributes = this._getAttributes(hass, config.entity);

was fired before

and thus the _updateContent method was not able to read this.source.

This PR fixes the issue by setting this.source on first load at soon as possible.

No more issues!

@amaximus amaximus merged commit e8eccb2 into amaximus:master Nov 3, 2023
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