thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
561 stars 37 forks source link

"Custom element doesn't exist: fold-entity-row" after update. #168

Closed Aephir closed 3 years ago

Aephir commented 3 years ago

My Home Assistant version: 2021.6.5

Fold-entity-row version (FROM BROWSER CONSOLE): 20.0.4 (This is not from console, it does not show in browser console, but I have updated to latest, and also reinstalled several times, reinstalling the latest, which is 20.0.4)

What I am doing: Updated home assistant (core, docker container).

What I expected to happen: Card works as before

What happened instead: I get an error: Custom element doesn't exist: fold-entity-row.

Minimal steps to reproduce:

          - type: entities
            title: Main Floor Lights
            show_header_toggle: false
            entities:
              - type: custom:fold-entity-row
                head: light.conservatory_lights
                entities:
                  - entity: light.conservatory_couch
                    type: custom:slider-entity-row
                    toggle: true
                  - entity: light.conservatory_floor_1
                    type: custom:slider-entity-row
                    toggle: true

Error messages from the browser console: fold-entity-row.js:42 Uncaught SyntaxError: Unexpected token 'export' I have seen the same issue with both web browser (Firefox 89.0.1, Chrome 91.0.4472.114) and on Android app.

Further, it is not listed as one the the "not loaded" HACS integrations. I cannot guarantee which version of Home Assistant I started seeing this, as the fold-entity-row in used on dashboards I rarely use. I have tried re-installing fold-entity-row, as well as clearing cache and restarting Home Assistant several times, in various orders.

It looks to me like #155 (which was closed, due to failure of "checkboxing").


By putting an X in the boxes ([X]) below, I indicate that I:

thomasloven commented 3 years ago

Go to https://my.home-assistant.io/redirect/lovelace_resources/ and make sure the type of fold-entity-row is set to "JavaScript Module".

Aephir commented 3 years ago

Ahhh, I needed to change my ui-lovalace.yaml (I'm using yaml mode) from:

resources:
  - url: /hacsfiles/lovelace-fold-entity-row/fold-entity-row.js
    type: js

to:

resources:
  - url: /hacsfiles/lovelace-fold-entity-row/fold-entity-row.js
    type: module

I must have missed that update. But it looks good now. Thanks!