Lovelace: Button card


#268

Thank you for this! I found the error as well but hadn’t refreshed the cache.


#269

Thanks for the example. This card might be useful in certain scenarios.


#270

Thanks for the work !
Yesterday everything was ok, but this morning I have this error :
Custom element doesn't exist: button-card.
Any ideas ?


#271

I’m getting this for another custom card too… So I guess its not relating to the card but something else going on…


#272

This fixed a few custom cards for me.


#273

Yeah, I did that one already :confused:


#274

edit : it’s ok !
change first line of button-card.js
import { LitElement, html, } from 'https://unpkg-gcp.firebaseapp.com/@polymer/[email protected]/lit-element.js?module';
and delete cache


#275

Wait, so does this mean Lovelace can’t run locally?

Does it always require an internet connection?


#276

seems that way, for custom-cards. I believe the normal cards are ok without internet


#277

is-it possible to store custom-cards local ?


#278

That is well f#$%ed totally unacceptable.


#279

Are you on 0.85.1? According to @thomasloven (in discord) it should have been fixed in that…


#280

So don’t use custom cards then…


#281

no…still on 0.84.6 I haven’t updated as I’m away at the moment and would rather be at home in case I need to SSH in to fix something. I am always rather wary of updates. Perhaps thats the reason for my custom-card issues elsewhere too :thinking:


#282

I’d prefer not to use Lovelace at all but that’s not going to be an option. So custom cards will be required to replace my current functionality using Custom UI: Tiles.


#283

Dunno. It’s weird that it only cropped up now and not before 0.85.1 though…


#284

I only tried the dark-sky card for the first time yesterday. I didn’t have any other cards using these tools prior to that


#285

I think you misunderstood what I said on discord.

The problem that’s been fixed with 0.85.1 is that resources weren’t saved in the GUI Raw editor.

The problem with some custom cards that some are experiencing right now is because unpkg - a repository of javascript packages - seems to be having problems.
In other words, the problems are due to the reliance of an external source (which also, yes, makes some custom cards depend on an internet connection).
I know some cards have had fixes already proposed by @iantrich to minimize this dependency, but it might take a while to roll them out.

For information, none of my plugins rely on unpkg or any external source except Home Assistant itself.

Edit: To be fair, The example code for custom cards in the developer documentation also uses unpkg, and that seems to be common practice among web developers - but I’m not one, so I wouldn’t know.


#286

Ah thanks for clarifying. I did misunderstand.


#287

If you read my post you’ll see that I am using conditional cards, and that it is working, but the issue is that some icons are not working