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.
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.
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.