FWIW… I don’t think this problem is resolved.
I’m creating my first custom card and everytime i make a change to the name of the card, I get the dreaded Error: Element Not Found.
So what I’m doing to get around this is i started using version numbers in my lovelace config for my custom card ‘sleepTimer’:
title: 3911OFW
resources:
- url: /local/loveLace/customCards/sleepTimer.js?v=3.8
type: js
- url: /local/loveLace/customCards/timer-card.js
type: js
- url: /local/loveLace/customCards/entity-attributes-card.js
type: js
views:
- !include ./www/loveLace/viewConfigs/bedroom.yaml
- !include ./www/loveLace/viewConfigs/living_room.yaml
- !include ./www/loveLace/viewConfigs/security.yaml
Then on the lovelace overview panel i use this to display my card:
path: living-room
title: Living Room
cards:
- type: custom:sleep-timer
entity: binary_sensor.office_leftwindow
When i do a “Refresh” from the overview panel menu, i still get the error. But if i refresh the page with my browser, it starts working correctly.
Using the version number is not a fix, its a workaround to force the server to act correctly.
I’ve run into this problem before when writing some backend code for an Apache server.
In my case, even though it appears to be a browser issue, its not. what is happening is that somewhere in the servers food chain, data is getting double or tripled buffered or cached and the backend code cant see the changes you made until the change bubbles up through the buffers to get processed properly. So using the version number or refreshing the browser or using another browser or using another computer helps to push changes through all the buffering/caching. After that everything seems to work great until the next change comes along.
I cant exactly remember how we fixed it, but it was something like apache had buffering on, sql had buffering on, and we were using memcache for buffering and the service provider was using some sort of cache. I think we turned off the sql server cache and the service providers cache, then everything worked hunky dorey!!
Hope this helps to fix the problem, cause im already sick of changing the version number everytime i make a code change.