dckiller51/lovelace-body-miscale-card

Home Assistant can't load the custom element

kntsoft opened this issue · 1 comments

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue:
v5.9.2

Last working release (if known):
It's my first installation

Browser and Operating System:

Browser: Chrome Version 105.0.5195.125 (Official Build) (64-bit)

Operating System: Manjaro Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.15.65-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz
Memory: 15.4 GiB of RAM
Graphics Processor: llvmpipe
Manufacturer: Dell Inc.
Product Name: XPS 13 7390 2-in-1

Description of problem:
Error loading the file body-miscale-card.js, whe I use it in the lovelace It don't load and show an error.

Javascript errors shown in the web inspector (if applicable):

Uncaught SyntaxError: Unexpected reserved word (at body-miscale-card.js?v=1.0.0:306:77)

When I push in this message, it shows this line:

function me(e){return le({descriptor:t=>({async get(){var t;return await this.updateComplete,null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0})})}

Additional information:
Visual Code showme a message with an error in the file:

'await' expressions are only allowed within async functions and at the top levels of modules.ts(1308)
body-miscale-card.js(537, 50): Did you mean to mark this function as 'async'?

I check my file again and I found some changes with the original file. I think that the autoformatter of Visual Studio Code, join the word asynget().

I downloaded the file and put it in my home assistant folder and it runs