#Help getting started with custom card

1 messages · Page 1 of 1 (latest)

humble vapor
#

I am trying to add a custom card to my dashboard: https://github.com/nervetattoo/simple-thermostat?tab=readme-ov-file

I placed simple-thermostat.js into /config/www/cards, and then added an entry to my Resources page with the URL /local/cards/simple-thermostat.js.

I restarted Home Assistant, but I am unable to add this card to my dashboard. It is not available in the list of cards, and when I choose "Manual" and add type: "custom:simple-thermostat", I get an error "Custom element doesn't exist"

I'm sure I must be missing something, but I don't see anything in the official documentation about how to implement a custom card.

Could somebody point me in the right direction?

ps - I am not new to Home Assistant, but the tag options don't seem to cover my question. I've selected "Panel" because that sounds similar to a card.

GitHub

A different take on the thermostat card for Home Assistant ♨️ - nervetattoo/simple-thermostat

mossy granite
#

then added an entry to my Resources page with the URL /local/cards/simple-thermostat.js.
If you installed via HACS, you shouldn't have to do that. That used to be a thing many years ago but I've never had to mess with the Resources. I just installed it myself to make sure it works which it does and I did not add the resource.
The thing to remember when adding custom cards, is you have to refresh your browser/app and sometimes you might have to clear its cache. (In my case, I installed within Firefox (the installation offered a Reload), but in Chrome I had to refresh. Usually, a SHIFT+F5 or SHIFT+Refresh click, does the job.
If you have to clear your cache, take a look at this thread.
https://discord.com/channels/330944238910963714/1288508168007061526

#

Also, be aware that that card has not been updated in about 3 years so it will not be Sections-friendly if you're using the Sections view. (There's probably some workaround for it depending on your dashboard's design and layout.)

humble vapor
#

I don't have HACS, and honestly I'd prefer not to use it at least until I understand how this all works without it. The manual install instructions seem simple enough, and I've even confirmed that the simple-thermostat.js file is accessible through the URL. I cleared my browser cache, but I'm still getting the same error when trying to add the card.

hoary charm
#

Does it appear in the picker?

#

All the steps you've done sound correct, and I did the same and it worked fine for me...

humble vapor
#

No, it doesn't. Could it be the additional directory level I've added for organizational purposes? The cards folder in my URL? I figured as long as it could resolve it would be fine, but perhaps there is something hard-coded to look in the root www directory?

hoary charm
#

I tested with /cards folder as well and it was fine.

#

Checked browser console for any errors that look relevant? You can also test window.customCards, see if anything shows up there:

humble vapor
#

I'll look into that tonight!