Button-Card not found or integrations generally not working

Hi,

Spent ages trying to get this working before posting including reviewing posts on here, but nothing seems the help.
ISSUE: Button-Card was working, but within the dashboard its now stating “Custom element doesn’t exist: button-card”

Things I’ve checked:

  • I installed the mod through HACS and it placed the file in /mnt/homeassistant/homeassistant/www/community/button-card/button-card.js
  • This is referenced in the Resources section of the dashboard (Manage resources). I’ve checked its linking to the correct file which is listed as a JS Module
  • This was working and in an attempt to resolve I’ve now just updated HA to the latest version
  • I’ve cleared the browser cache, but it feels like the issue is that the mod file can’t be found since the dashboard is reporting “Doesn’t exist”
  • I’ve tried adding the reference to the file under Resources within Config yaml, but that then throws a notification error that the file can’t be found.

Would appreciate any other suggestions as to why this has stopped working or tests I could do. I was thinking that maybe it could be security related, but the ownership of the files hasn’t changed.

Thanks

IIRC the button card was originally a custom component from HACS, there is now a native button card in HA. It should be the 3rd card shown when you choose add card.

Ah, I didn’t know that and thanks for the pointer.

I will probably use that, but would be helpful to know whats broken with my custom modifications/integrations, since I might like to use some others.

thanks

So I looked and I still have the custom button card. I had to remove the - before type to get it to show up

  type: 'custom:button-card'
  entity: sensor.flue_max
  layout: icon_state_name2nd
  show_state: true
  show_name: true
  show_label: true
  label: label

instead of

- type: 'custom:button-card'
  entity: sensor.flue_max
  layout: icon_state_name2nd
  show_state: true
  show_name: true
  show_label: true
  label: label

I believe I’ve just fixed it myself

I changed the resource URL from
/mnt/homeassistant/homeassistant/www/community/button-card/button-card.js
to
local/community/button-card/button-card.js

Would be great to understand more about how HA references files, since ‘local’ is clearly a link to the www directory, but why doesn’t a fully qualified URL work? Previously I’d tried local/www/community/button-card/button-card.js which would have resolved to www/www/community… which clearly isn’t correct.

Thanks

These are absolutely separate cards.
You can use both of them.