thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

Integration won't start - TypeError: t is undefined #112

Closed teddy-rpi closed 1 year ago

teddy-rpi commented 1 year ago

Hi there,

recently all my wonderful template-entity-rows are no longer displayed. In the logs I could find the following error:

Logger: frontend.js.latest.202304110 Source: components/system_log/__init__.py:257 First occurred: 19:15:48 (56 occurrences) Last logged: 19:16:27 http://192.168.178.94:8123/local/community/lovelace-template-entity-row/template-entity-row.js:1:4360 TypeError: t is undefined

Any help would be appreciated, as I really love this integration.

Best Regards

Teddy

teddy-rpi commented 1 year ago

Deleting and reinstalling the integration (via HACS) didn't help. Anyone?

ildar170975 commented 1 year ago

Check with the simplest code:

type: entities
entities:
  - type: custom:template-entity-row
    entity: sun.sun

and post a screenshot & errors from Code inspector.

teddy-rpi commented 1 year ago
Bildschirmfoto 2023-04-27 um 21 02 43
teddy-rpi commented 1 year ago
Bildschirmfoto 2023-04-27 um 21 06 44
teddy-rpi commented 1 year ago

No result both ways. Btw, I'm on Home Assistant 2023.4.6 Supervisor 2023.04.1 Operating System 10.0 Frontend 20230411.1 - latest, HACS 1.32.1, template-entity-row 1.3.2

ildar170975 commented 1 year ago

I asked about Code inspector, placing the code into Dev tools ->Templates is meaningless.

teddy-rpi commented 1 year ago

ok, sorry. I haven't used Code inspector before. Where do I find it?

ildar170975 commented 1 year ago

In Chrome & Win (same in FF) it is F12.

изображение

teddy-rpi commented 1 year ago

OK, I guess you mean the code inspector in my browser, right?

Here are the error codes:

You may not be getting optimal performance out of card-mod. See https://github.com/thomasloven/lovelace-card-mod#performance-improvements [card-mod.js:5:12326](http://192.168.178.94:8123/hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524322) BROWSER_MOD 2.2.1 IS INSTALLED BrowserID: d291b6d5-64b84d37 [browser_mod.js:407:6207](http://192.168.178.94:8123/browser_mod.js) You may not be getting optimal performance out of card-mod. See https://github.com/thomasloven/lovelace-card-mod#performance-improvements [card-mod.js:5:12326](http://192.168.178.94:8123/local/community/lovelace-card-mod/card-mod.js) TEMPLATE-ENTITY-ROW 1.3.2 IS INSTALLED <empty string> [template-entity-row.js:49:267](http://192.168.178.94:8123/local/community/lovelace-template-entity-row/template-entity-row.js) CARD-MOD 3.2.2 IS INSTALLED [card-mod.js:5:247](http://192.168.178.94:8123/hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524322) MULTIPLE-ENTITY-ROW 4.1.0 [multiple-entity-row.js:1:7548](http://192.168.178.94:8123/local/multiple-entity-row.js?v=4.1.0) STACK-IN-CARD Version 0.2.0 [stack-in-card.js:200:5682](http://192.168.178.94:8123/local/stack-in-card.js) The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information. [config-template-card.js:329:12](http://192.168.178.94:8123/hacsfiles/config-template-card/config-template-card.js?hacstag=172177543136) CONFIG-TEMPLATE-CARD Version 1.3.6 [config-template-card.js:735:9](http://192.168.178.94:8123/hacsfiles/config-template-card/config-template-card.js?hacstag=172177543136) TEMPLATE-ENTITY-ROW 1.3.2 IS INSTALLED <empty string> [template-entity-row.js:49:267](http://192.168.178.94:8123/hacsfiles/lovelace-template-entity-row/template-entity-row.js?hacstag=231674882132) computeCardSize is 4.2 10 [config-template-card.js:788:25](http://192.168.178.94:8123/hacsfiles/config-template-card/config-template-card.js?hacstag=172177543136) Uncaught TypeError: t is undefined adoptedStyleSheets template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 connectedCallback template-entity-row.js:1 connectedCallback template-entity-row.js:1 S lit-html.ts:1402 T lit-html.ts:1445 $ lit-html.ts:1551 _$AI lit-html.ts:1375 G lit-html.ts:2172 update lit-element.ts:165 performUpdate reactive-element.ts:1331 scheduleUpdate reactive-element.ts:1263 _$Ej reactive-element.ts:1235 [template-entity-row.js:1:4360](http://192.168.178.94:8123/local/community/lovelace-template-entity-row/template-entity-row.js) Uncaught TypeError: t is undefined adoptedStyleSheets template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 connectedCallback template-entity-row.js:1 connectedCallback template-entity-row.js:1 value hass-router-page.ts:318 _currentLoadProm hass-router-page.ts:216 2 [template-entity-row.js:1:4360](http://192.168.178.94:8123/local/community/lovelace-template-entity-row/template-entity-row.js) Die Verbindung zu ws://192.168.178.94:8123/api/websocket wurde unterbrochen, während die Seite geladen wurde. [socket.js:34:23](http://192.168.178.94:8123/frontend_latest/no-source/node_modules/home-assistant-js-websocket/dist/socket.js) Uncaught (in promise) Object { code: "not_found", message: "Subscription not found." } 5 Uncaught TypeError: t is undefined adoptedStyleSheets template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 connectedCallback template-entity-row.js:1 connectedCallback template-entity-row.js:1 S lit-html.ts:1402 T lit-html.ts:1445 $ lit-html.ts:1551 _$AI lit-html.ts:1375 G lit-html.ts:2172 update lit-element.ts:165 performUpdate reactive-element.ts:1331 scheduleUpdate reactive-element.ts:1263 _$Ej reactive-element.ts:1235 6 [template-entity-row.js:1:4360](http://192.168.178.94:8123/local/community/lovelace-template-entity-row/template-entity-row.js) Uncaught TypeError: e is undefined a coordinates.ts:122 _subscribed hui-graph-header-footer.ts:161 v history.ts:254 _handleMessage connection.js:23 _handleMessage connection.js:15 2 [coordinates.ts:122:54](https://raw.githubusercontent.com/home-assistant/frontend/20230411.1/src/panels/lovelace/common/graph/coordinates.ts) Diese Seite verwendet die nicht standardisierte Eigenschaft "zoom". Stattdessen sollte calc() in den entsprechenden Eigenschaftswerten oder "transform" zusammen mit "transform-origin: 0 0" verwendet werden. [0](http://192.168.178.94:8123/lovelace/0?edit=1) card alarm-panel Error: Invalid configuration value hui-alarm-panel-card.ts:86 a create-element-base.ts:97 h create-element-base.ts:140 h create-element-base.ts:238 d create-element-base.ts:172 k create-card-element.ts:99 value hui-card-preview.ts:88 value hui-card-preview.ts:56 performUpdate reactive-element.ts:1331 scheduleUpdate reactive-element.ts:1263 _$Ej reactive-element.ts:1235 [create-element-base.ts:182:12](https://raw.githubusercontent.com/home-assistant/frontend/20230411.1/src/panels/lovelace/create-element/create-element-base.ts) Uncaught TypeError: t is undefined adoptedStyleSheets template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 connectedCallback template-entity-row.js:1 connectedCallback template-entity-row.js:1 S lit-html.ts:1402 T lit-html.ts:1445 $ lit-html.ts:1551 _$AI lit-html.ts:1375 G lit-html.ts:2172 update lit-element.ts:165 performUpdate reactive-element.ts:1331 scheduleUpdate reactive-element.ts:1263 _$Ej reactive-element.ts:1235 [template-entity-row.js:1:4360](http://192.168.178.94:8123/local/community/lovelace-template-entity-row/template-entity-row.js) Uncaught TypeError: t is undefined adoptedStyleSheets template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 connectedCallback template-entity-row.js:1 connectedCallback template-entity-row.js:1 value hass-router-page.ts:318 _currentLoadProm hass-router-page.ts:216 6 [template-entity-row.js:1:4360](http://192.168.178.94:8123/local/community/lovelace-template-entity-row/template-entity-row.js) Layout-Darstellung wurde erzwungen, bevor die Seite vollständig geladen war. Falls Stylesheet noch nicht geladen sind, kann dies zu einem kurzzeitigen Darstellung des Inhalts ohne Formatierung führen. [energie-24h](http://192.168.178.94:3000/api/hassio_ingress/NDIHffQSjuKvAG4cS5aLMc5Q8rn8PM7txX_xxMWyE3s/d-solo/kCzeLXgRz/energie-24h?orgId=1&from=now-24h&to=now&theme=light&panelId=2%22%20width=%22450%22%20height=%22200%22%20frameborder=%220%22) Layout-Darstellung wurde erzwungen, bevor die Seite vollständig geladen war. Falls Stylesheet noch nicht geladen sind, kann dies zu einem kurzzeitigen Darstellung des Inhalts ohne Formatierung führen. [energie-24h](http://192.168.178.94:3000/api/hassio_ingress/NDIHffQSjuKvAG4cS5aLMc5Q8rn8PM7txX_xxMWyE3s/d-solo/kCzeLXgRz/energie-24h?orgId=1&from=now-24h&to=now&theme=light&panelId=7%22%20width=%22450%22%20height=%22200%22%20frameborder=%220%22) Layout-Darstellung wurde erzwungen, bevor die Seite vollständig geladen war. Falls Stylesheet noch nicht geladen sind, kann dies zu einem kurzzeitigen Darstellung des Inhalts ohne Formatierung führen. [energie-24h](http://192.168.178.94:3000/api/hassio_ingress/NDIHffQSjuKvAG4cS5aLMc5Q8rn8PM7txX_xxMWyE3s/d-solo/kCzeLXgRz/energie-24h?orgId=1&from=now-24h&to=now&theme=light&panelId=5%22%20width=%22450%22%20height=%22200%22%20frameborder=%220%22) Layout-Darstellung wurde erzwungen, bevor die Seite vollständig geladen war. Falls Stylesheet noch nicht geladen sind, kann dies zu einem kurzzeitigen Darstellung des Inhalts ohne Formatierung führen. [energie-24h](http://192.168.178.94:3000/api/hassio_ingress/NDIHffQSjuKvAG4cS5aLMc5Q8rn8PM7txX_xxMWyE3s/d-solo/kCzeLXgRz/energie-24h?orgId=1&from=now-24h&to=now&theme=light&panelId=14%22%20width=%22450%22%20height=%22200%22%20frameborder=%220%22) Layout-Darstellung wurde erzwungen, bevor die Seite vollständig geladen war. Falls Stylesheet noch nicht geladen sind, kann dies zu einem kurzzeitigen Darstellung des Inhalts ohne Formatierung führen. [stocks](http://192.168.178.94:3000/api/hassio_ingress/NDIHffQSjuKvAG4cS5aLMc5Q8rn8PM7txX_xxMWyE3s/d-solo/Xokr8RiRk/stocks?orgId=1&from=now-7d&to=now&theme=light&panelId=7) Uncaught TypeError: e is undefined a coordinates.ts:122 _subscribed hui-graph-header-footer.ts:161 v history.ts:254 _handleMessage connection.js:23 _handleMessage connection.js:15 2 [coordinates.ts:122:54](https://raw.githubusercontent.com/home-assistant/frontend/20230411.1/src/panels/lovelace/common/graph/coordinates.ts) card alarm-panel Error: Invalid configuration value hui-alarm-panel-card.ts:86 a create-element-base.ts:97 h create-element-base.ts:140 h create-element-base.ts:238 d create-element-base.ts:172 k create-card-element.ts:99 value hui-card-preview.ts:88 value hui-card-preview.ts:56 performUpdate reactive-element.ts:1331 scheduleUpdate reactive-element.ts:1263 _$Ej reactive-element.ts:1235 [create-element-base.ts:182:12](https://raw.githubusercontent.com/home-assistant/frontend/20230411.1/src/panels/lovelace/create-element/create-element-base.ts) Uncaught TypeError: t is undefined adoptedStyleSheets template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 createRenderRoot template-entity-row.js:1 connectedCallback template-entity-row.js:1 connectedCallback template-entity-row.js:1 S lit-html.ts:1402 T lit-html.ts:1445 $ lit-html.ts:1551 _$AI lit-html.ts:1375 G lit-html.ts:2172 update lit-element.ts:165 performUpdate reactive-element.ts:1331 scheduleUpdate reactive-element.ts:1263 _$Ej reactive-element.ts:1235

teddy-rpi commented 1 year ago

Is this helpful at all? Btw, in the Companion App (iPhone) it is the same issue. No template entity rows displayed. When the issue first appeared I rolled back to a prior backup (core_2023.4.3), the template entity rows reappeared in the Companion App, not in Firefox. After a few hours without any further changes the template entity rows disappeared in the Companion App. Really strange behaviour.

ildar170975 commented 1 year ago

Is this helpful at all?

Not at all since you stacked all info from console in one pile. I suggest you to remove all you custom frontend plugins, reinstall HACS & install template-entity-row only.

teddy-rpi commented 1 year ago

Will try that, thank you!

teddy-rpi commented 1 year ago

As you suggested, I removed all frontend plugins, reinstalled HACS (via SSH) and installed template-entity-row only, but unfortunately without success. Still won't start and won't display my template-entity-rows. Any other advice other than reinstalling a hassio installation with 1697 entities and >20.000 lines of config, automation and frontend code?

ildar170975 commented 1 year ago

Unfortunately, I have no idea what can cause your issue...

teddy-rpi commented 1 year ago

Solved it! For whatever reason I had the following code in my configuration.yaml from long ago. It seems I tried to load both integrations as frontend modules as is recommended for card-mod:

frontend: extra_module_url: - /local/community/lovelace-card-mod/card-mod.js - /local/community/lovelace-template-entity-row/template-entity-row.js

When removing all the frontend integrations I forgot to delete these lines. After repeating the process with the lines deleted I only had to redownload the plugins and everything was back to normal. 😄 Thanks @ildar170975 for your help and patience!

ildar170975 commented 1 year ago

Congratulations! This line should be kept (note an indentation before extra_module_url):

frontend:
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js

another one for template-entity-row must be removed.