custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.95k stars 236 forks source link

Loading glitch on page refresh #8

Closed lorentzfb closed 5 years ago

lorentzfb commented 6 years ago

This shows up for a few seconds on when page is refreshed or loads for the first time. Can this be avoided?

error

kuuji commented 6 years ago

I'm not sure. All of the Lovelace "modules" that I use do that. The scripts do not. It looks like an issue in the way Lovelace loads the modules.

^ I'm referring to the type when you include the card resources in ui-lovelace.yaml. This is a module, the problem doesn't occur for cards that have a js type.

Have you tried searching in the forum? I haven't had time to look into that yet. I'd appreciate some help in debugging this ;)

dustins1983 commented 5 years ago

I had this same issue when I first started using this card which was a few days ago. I have several custom items in lovelace and the button car was my last. I thought as a shot in the dark maybe since its listed last, it loads last?

So i ordered it second and it has not done it since. The only other thing I did was eliminate one custom card I am not currently using. My love lace looks like this now:

resources:

All modules have always worked without this issue. I did # out the surveillance card at the same time.

I dont know if its just dumb luck, but like i said, its been fine since that change.