artem-sedykh / mini-climate-card

Minimalistic climate card for Home Assistant Lovelace UI
MIT License
262 stars 19 forks source link

Card not showing in Chrome Version 120.0.6099.71 (Official Build) (x86_64) #137

Closed elgeniskogen closed 6 months ago

elgeniskogen commented 6 months ago

The card was working fine earlier, now it does not show in Chrome browser on latest OS version for Mac. Shows in HA app on Mac and in Safari in Mac.

Using v2.6.2 of mini-climate-card Using Version 120.0.6099.71 (Official Build) (x86_64) of Chrome browser Using these verions of HA: Core 2023.12.1 Supervisor 2023.11.6 Operating System 11.2 Frontend 20231208.2

Hope you can help!

br Erik :-)

regevbr commented 6 months ago

I have the same chorme version and it works for me on Ubuntu. Sadly don't have a Mac to test it out... If you can provide more info from the dev tools or what ver you can think of I might be able to help but I won't keep my hopes up. In any case a PR is more than welcome if you are able to fix it yourself.

elgeniskogen commented 6 months ago

Thanks for VERY quick response :-)

I would LOVE to be capable to propose a fix myself, but I am not that capable in programming :-( Would the attached console log help?

Screenshot 2023-12-11 at 11 57 04

br Erik :-)

regevbr commented 6 months ago

It does help, let me look into it

regevbr commented 6 months ago

@elgeniskogen I just published a new version 2.7.0 that updates the libs that the error came from, hoping it will help... Please let me know if it worked

flipaz commented 6 months ago

I'm seeing similar issue on my environment after upgrading to HA 2023.12.1, on arm64 (raspeberry pi 4) Core 2023.12.1 Supervisor 2023.11.6 Operating System 11.2 Frontend 20231208.2

Also tested with latest 2.7.0 and climate cards still do not appear (even after HA restart and browser caches emptied and hard reload)

On chrome dev console, I see the following errors:

image

regevbr commented 6 months ago

Sadly I can't help much as it doesn't reproduce on my end and as you can see the obufscated code is impossible to debug by screenshots (it is also very very hard to debug even if I would have managed to reproduce). Once someone comes across that with the skills to debug, I will be happy to assist

DaN66O commented 6 months ago

After the update, the card stopped being displayed in chrome 12.0.0.6099.71 Everything worked before the update :( p.s. it works fine in Firefox Screenshot_13

p.s.s. it works fine in 121.0.6167.8 , beta

mgiako commented 6 months ago

Hi, I've the same problem on windows 10 and the latest chrome (120.0.6099.130) Works fine on edge (120.0.2210.91) and on the iphone app.

Here's the log from console

I'm available for testing...

4mini-climate-card-bundle.js:1 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at pc.u (mini-climate-card-bundle.js:1:17388)
    at S.g (mini-climate-card-bundle.js:1:19063)
    at S._$AI (mini-climate-card-bundle.js:1:18608)
    at wc (mini-climate-card-bundle.js:1:22117)
    at He.update (mini-climate-card-bundle.js:1:22506)
    at He.performUpdate (mini-climate-card-bundle.js:1:13447)
    at He.scheduleUpdate (mini-climate-card-bundle.js:1:13111)
    at mini-climate-card-bundle.js:1:13016
    at Generator.next (<anonymous>)
    at h (mini-climate-card-bundle.js:1:1205)
4temp:1 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at pc.u (mini-climate-card-bundle.js:1:17388)
    at S.g (mini-climate-card-bundle.js:1:19063)
    at S._$AI (mini-climate-card-bundle.js:1:18608)
    at wc (mini-climate-card-bundle.js:1:22117)
    at He.update (mini-climate-card-bundle.js:1:22506)
    at He.performUpdate (mini-climate-card-bundle.js:1:13447)
    at He.scheduleUpdate (mini-climate-card-bundle.js:1:13111)
    at mini-climate-card-bundle.js:1:13016
    at Generator.throw (<anonymous>)
    at h (mini-climate-card-bundle.js:1:1205)
100mini-climate-card-bundle.js:1 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at pc.u (mini-climate-card-bundle.js:1:17388)
    at S.g (mini-climate-card-bundle.js:1:19063)
    at S._$AI (mini-climate-card-bundle.js:1:18608)
    at wc (mini-climate-card-bundle.js:1:22117)
    at He.update (mini-climate-card-bundle.js:1:22506)
    at He.performUpdate (mini-climate-card-bundle.js:1:13447)
    at He.scheduleUpdate (mini-climate-card-bundle.js:1:13111)
    at mini-climate-card-bundle.js:1:13016
    at Generator.throw (<anonymous>)
    at h (mini-climate-card-bundle.js:1:1205)
4mini-climate-card-bundle.js:1 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at pc.u (mini-climate-card-bundle.js:1:17388)
    at S.g (mini-climate-card-bundle.js:1:19063)
    at S._$AI (mini-climate-card-bundle.js:1:18608)
    at wc (mini-climate-card-bundle.js:1:22117)
    at He.update (mini-climate-card-bundle.js:1:22506)
    at He.performUpdate (mini-climate-card-bundle.js:1:13447)
    at He.scheduleUpdate (mini-climate-card-bundle.js:1:13111)
    at mini-climate-card-bundle.js:1:13016
    at Generator.throw (<anonymous>)
    at h (mini-climate-card-bundle.js:1:1205)
(anonymous) @ mini-climate-card-bundle.js:1
h @ mini-climate-card-bundle.js:1
g @ mini-climate-card-bundle.js:1
Promise.then (async)
h @ mini-climate-card-bundle.js:1
f @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
_$Ej @ mini-climate-card-bundle.js:1
requestUpdate @ mini-climate-card-bundle.js:1
set @ mini-climate-card-bundle.js:1
set hass @ mini-climate-card-bundle.js:1
value @ hui-stack-card.ts:63
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
set hass @ stack-in-card.js:200
value @ hui-stack-card.ts:63
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
(anonymous) @ hui-view.ts:153
value @ hui-view.ts:151
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hui-root.ts:607
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ partial-panel-resolver.ts:101
value @ hass-router-page.ts:91
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hass-base-mixin.ts:56
_updateHass @ context-mixin.ts:95
(anonymous) @ connection-mixin.ts:227
s @ store.js:19
(anonymous) @ entities.js:74
e.subscribeMessage.type @ entities.js:76
(anonymous) @ connection.js:23
_handleMessage @ connection.js:15
Show 5 more frames
Show less
156mini-climate-card-bundle.js:1 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at pc.u (mini-climate-card-bundle.js:1:17388)
    at S.g (mini-climate-card-bundle.js:1:19063)
    at S._$AI (mini-climate-card-bundle.js:1:18608)
    at wc (mini-climate-card-bundle.js:1:22117)
    at He.update (mini-climate-card-bundle.js:1:22506)
    at He.performUpdate (mini-climate-card-bundle.js:1:13447)
    at He.scheduleUpdate (mini-climate-card-bundle.js:1:13111)
    at mini-climate-card-bundle.js:1:13016
    at Generator.throw (<anonymous>)
    at h (mini-climate-card-bundle.js:1:1205)
u @ mini-climate-card-bundle.js:1
g @ mini-climate-card-bundle.js:1
_$AI @ mini-climate-card-bundle.js:1
wc @ mini-climate-card-bundle.js:1
update @ mini-climate-card-bundle.js:1
performUpdate @ mini-climate-card-bundle.js:1
scheduleUpdate @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
h @ mini-climate-card-bundle.js:1
g @ mini-climate-card-bundle.js:1
Promise.then (async)
h @ mini-climate-card-bundle.js:1
f @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
_$Ej @ mini-climate-card-bundle.js:1
requestUpdate @ mini-climate-card-bundle.js:1
set @ mini-climate-card-bundle.js:1
set hass @ mini-climate-card-bundle.js:1
value @ hui-stack-card.ts:63
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
set hass @ stack-in-card.js:200
value @ hui-stack-card.ts:63
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
(anonymous) @ hui-view.ts:153
value @ hui-view.ts:151
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hui-root.ts:607
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ partial-panel-resolver.ts:101
value @ hass-router-page.ts:91
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hass-base-mixin.ts:56
_updateHass @ context-mixin.ts:95
(anonymous) @ connection-mixin.ts:227
s @ store.js:19
(anonymous) @ entities.js:74
e.subscribeMessage.type @ entities.js:76
(anonymous) @ connection.js:23
_handleMessage @ connection.js:15
Show 5 more frames
Show less
previsioni.php:156 

781mini-climate-card-bundle.js:1 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at pc.u (mini-climate-card-bundle.js:1:17388)
    at S.g (mini-climate-card-bundle.js:1:19063)
    at S._$AI (mini-climate-card-bundle.js:1:18608)
    at wc (mini-climate-card-bundle.js:1:22117)
    at He.update (mini-climate-card-bundle.js:1:22506)
    at He.performUpdate (mini-climate-card-bundle.js:1:13447)
    at He.scheduleUpdate (mini-climate-card-bundle.js:1:13111)
    at mini-climate-card-bundle.js:1:13016
    at Generator.throw (<anonymous>)
    at h (mini-climate-card-bundle.js:1:1205)
regevbr commented 6 months ago

Can you please share your card config?

mgiako commented 6 months ago

sure... I've four of them:

          - type: custom:stack-in-card
            mode: vertical
            cards:
              - type: custom:mini-climate
                entity: climate.termosala
                name: Sala
                group: true
                secondary_info:
                  type: hvac-action
                  source:
                    heating:
                      icon: 'mdi:fire'
                      name: 'Riscaldamento'

                icon: mdi:fire
                fan_mode:
                  disabled: true
                  hide: true
                toggle:
                  hide: true
                indicators:
                  humidity:
                    icon: mdi:water
                    unit: '%'
                    round: 1
                    source:
                      entity: sensor.ble_sala_humidity
                  wifi:
                    icon: mdi:wifi
                    unit: ''
                    source:
                      entity: sensor.termodisplay_wifi_signal
                buttons:
                  screen:
                    type: button              
                    location: main
                    icon: mdi:television-ambient-light
                    state:
                      entity: switch.termodisplay_backlight

              - type: custom:mini-climate
                entity: climate.termosopra
                name: Camere
                group: true
                secondary_info:
                  type: hvac-action
                  source:
                    heating:
                      icon: 'mdi:fire'
                      name: 'Riscaldamento'

                icon: mdi:fire
                fan_mode:
                  disabled: true
                  hide: true
                toggle:
                  hide: true
                indicators:
                  humidity:
                    icon: mdi:water
                    unit: '%'
                    round: 1
                    source:
                      entity: sensor.ble_camera_humidity
                  wifi:
                    icon: mdi:wifi
                    unit: ''
                    source:
                      entity: sensor.termosopra_signal

                buttons:
                  screen:
                    type: button              
                    location: main
                    icon: mdi:television-ambient-light
                    state:
                      entity: switch.termosopra_display

              - type: custom:mini-climate
                entity: climate.climacamera
                name: Clima Camera
                group: true
                secondary_info:
                  type: hvac-action
                  source:
                    heating:
                      icon: 'mdi:fire'
                      name: 'Riscaldamento'
                    cooling:
                      icon: 'mdi:snowflake'
                      name: 'Raffreddamento'

                toggle:
                  hide: true
                indicators:
                  humidity:
                    icon: mdi:water
                    unit: '%'
                    round: 1
                    source:
                      entity: sensor.ble_camera_humidity

                  wifi:
                    icon: mdi:wifi
                    unit: ''
                    source:
                      entity: sensor.climacamera_wifi_signal

              - type: custom:mini-climate
                entity: climate.climamarghe    
                name: Clima Marghe
                group: true
                secondary_info:
                  type: hvac-action
                  source:
                    heating:
                      icon: 'mdi:fire'
                      name: 'Riscaldamento'
                    cooling:
                      icon: 'mdi:snowflake'
                      name: 'Raffreddamento'
                toggle:
                  hide: true            
                indicators:
                  humidity:
                    icon: mdi:water
                    unit: '%'
                    round: 1
                    source:
                      entity: sensor.ble_cameretta_humidity
                  wifi:
                    icon: mdi:wifi
                    #unit: 'dBm'
                    source:
                      entity: sensor.climamarghe_wifi_signal
regevbr commented 6 months ago

Can you please try to create a simple card (not stack) with just 1 mini climate card that reproduces the issue? If you can check if one of the 4 is not creating thee issue this will make this task a whole lot easier

mgiako commented 6 months ago

Here:

          - type: custom:mini-climate
            entity: climate.termosala
            name: Sala
56mini-climate-card-bundle.js:1 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at ed.u (mini-climate-card-bundle.js:1:21785)
    at fd.g (mini-climate-card-bundle.js:1:23553)
    at fd._$AI (mini-climate-card-bundle.js:1:23086)
    at md (mini-climate-card-bundle.js:1:26659)
    at Xj.update (mini-climate-card-bundle.js:1:27046)
    at Xj.performUpdate (mini-climate-card-bundle.js:1:17939)
    at Xj.scheduleUpdate (mini-climate-card-bundle.js:1:17369)
    at mini-climate-card-bundle.js:1:17274
    at Generator.throw (<anonymous>)
    at t (mini-climate-card-bundle.js:1:1205)
u @ mini-climate-card-bundle.js:1
g @ mini-climate-card-bundle.js:1
_$AI @ mini-climate-card-bundle.js:1
md @ mini-climate-card-bundle.js:1
update @ mini-climate-card-bundle.js:1
performUpdate @ mini-climate-card-bundle.js:1
scheduleUpdate @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
t @ mini-climate-card-bundle.js:1
g @ mini-climate-card-bundle.js:1
Promise.then (async)
t @ mini-climate-card-bundle.js:1
f @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
_$EP @ mini-climate-card-bundle.js:1
requestUpdate @ mini-climate-card-bundle.js:1
set @ mini-climate-card-bundle.js:1
set hass @ mini-climate-card-bundle.js:1
(anonymous) @ hui-view.ts:153
value @ hui-view.ts:151
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hui-root.ts:607
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ partial-panel-resolver.ts:101
value @ hass-router-page.ts:91
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hass-base-mixin.ts:56
_updateHass @ context-mixin.ts:95
(anonymous) @ connection-mixin.ts:227
s @ store.js:19
(anonymous) @ entities.js:74
e.subscribeMessage.type @ entities.js:76
(anonymous) @ connection.js:23
_handleMessage @ connection.js:15
mgiako commented 6 months ago

even the simplest card gives the error on chrome, on safari or edge it is ok

regevbr commented 6 months ago

I managed to create the non-minified code of the card so we can see a real stack trace and potentially do a proper breakpoint. Please delete the file /config/www/community/mini-climate-card/mini-climate-card-bundle.js.gz Please set the content of the file /config/www/community/mini-climate-card/mini-climate-card-bundle.js to https://gist.github.com/regevbr/047092e6f76fb2777a4ed8f4fe698bb8 Go to http://<ha url>/config/lovelace/resources and change a single digit in the query string number of the mini climate card image Open your HA in a new window, and open the insepct window and make sure that the disable cache is checked in the network tab image Then reload and send the stack trace. If you can put breakpoints and see what element it tries to call the importNode and gather more information it will be great

mgiako commented 6 months ago

Sorry for the delay... we had Christmas lunch.

I have two questions on your instructions.

1) I deleted the .gz file and set the content of the .js file to https://gist.github.com/regevbr/047092e6f76fb2777a4ed8f4fe698bb8. Right? Not in the the .gz file (you wrote in the gz.file)

2) I'm in yaml mode... how can I follow your instructions if I can't open the resources page?

Sorry I'm not so good at this...

regevbr commented 6 months ago
  1. correct my bad
  2. what do you mean yaml mode? this is a fronend URL not configuration file. You can go to it by going to the settings page, clicking on dashboards. clicking the 3 dots menu at the top, and choosing resources
mgiako commented 6 months ago

1) ok!

2) in configuration.yaml I have:

lovelace:
  mode: yaml

so if I use the 3 dots menu/resources I get: " You are using your dashboard in YAML mode, therefore you cannot manage your resources through the UI. Manage them in configuration.yaml."

In configuration.yaml I have:

 resources:
    - url: /hacsfiles/lovelace-auto-entities/auto-entities.js
      type: module
    - url: /hacsfiles/mini-media-player/mini-media-player-bundle.js
      type: module
    - url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js
      type: module
    - url: /hacsfiles/bar-card/bar-card.js
      type: module
    - url: /hacsfiles/button-card/button-card.js
      type: module
    - url: /hacsfiles/lovelace-multiple-entity-row/multiple-entity-row.js
      type: module
    - url: /hacsfiles/stack-in-card/stack-in-card.js
      type: module
    - url: /hacsfiles/lovelace-card-mod/card-mod.js
      type: module
    - url: /hacsfiles/battery-state-card/battery-state-card.js
      type: module
    - url: /hacsfiles/apexcharts-card/apexcharts-card.js
      type: module
    - url: /hacsfiles/config-template-card/config-template-card.js
      type: module
    - url: /hacsfiles/lovelace-plotly-graph-card/plotly-graph-card.js
      type: module      
    - url: /hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js
      type: module      
    - url: /hacsfiles/vacuum-card/vacuum-card.js
      type: module
    - url: /hacsfiles/history-explorer-card/history-explorer-card.js  
      type: module
    - url: /hacsfiles/lovelace-fan-xiaomi/xiaomi-fan-card.js
      type: module
    - url: /hacsfiles/hass-swipe-navigation/swipe-navigation.js
      type: module      
    - url: /hacsfiles/simple-thermostat/simple-thermostat.js
      type: module
    - url: /hacsfiles/ha-sankey-chart/ha-sankey-chart.js
      type: module
    - url: /hacsfiles/formulaone-card/formulaone-card.js
      type: module  
    - url: /hacsfiles/mini-climate-card/mini-climate-card-bundle.js
      type: module      
    - url: /hacsfiles/kiosk-mode/kiosk-mode.js
      type: module
regevbr commented 6 months ago

Oh ok so you have nothing to change, I was not aware of such a mode. You can move on to the next steps (with disabled cache)

mgiako commented 6 months ago

Like this?

Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at ed.u (mini-climate-card-bundle.js:1:21785)
    at fd.g (mini-climate-card-bundle.js:1:23553)
    at fd._$AI (mini-climate-card-bundle.js:1:23086)
    at md (mini-climate-card-bundle.js:1:26659)
    at Xj.update (mini-climate-card-bundle.js:1:27046)
    at Xj.performUpdate (mini-climate-card-bundle.js:1:17939)
    at Xj.scheduleUpdate (mini-climate-card-bundle.js:1:17369)
    at mini-climate-card-bundle.js:1:17274
    at Generator.throw (<anonymous>)
    at t (mini-climate-card-bundle.js:1:1205)
u @ mini-climate-card-bundle.js:1
g @ mini-climate-card-bundle.js:1
_$AI @ mini-climate-card-bundle.js:1
md @ mini-climate-card-bundle.js:1
update @ mini-climate-card-bundle.js:1
performUpdate @ mini-climate-card-bundle.js:1
scheduleUpdate @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
t @ mini-climate-card-bundle.js:1
g @ mini-climate-card-bundle.js:1
Promise.then (async)
t @ mini-climate-card-bundle.js:1
f @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
(anonymous) @ mini-climate-card-bundle.js:1
_$EP @ mini-climate-card-bundle.js:1
requestUpdate @ mini-climate-card-bundle.js:1
set @ mini-climate-card-bundle.js:1
set hass @ mini-climate-card-bundle.js:1
(anonymous) @ hui-view.ts:153
value @ hui-view.ts:151
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hui-root.ts:607
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ partial-panel-resolver.ts:101
value @ hass-router-page.ts:91
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hass-base-mixin.ts:56
_updateHass @ context-mixin.ts:95
(anonymous) @ connection-mixin.ts:227
s @ store.js:19
(anonymous) @ entities.js:74
e.subscribeMessage.type @ entities.js:76
(anonymous) @ connection.js:23
_handleMessage @ connection.js:15

Show 5 more frames

regevbr commented 6 months ago

No, it uses the old js value.. you can see by that fact that the names in the file are just random charges and not plain english

mgiako commented 6 months ago

I put your repository's gistfile1.txt file in the config\www\community\mini-climate-card folder and renamed it to mini-climate-card-bundle.js. It's correct?

regevbr commented 6 months ago

Correct

mgiako commented 6 months ago

then image

and in console I have:

image

regevbr commented 6 months ago

Great let me look over it for a few minutes

regevbr commented 6 months ago

Can you run in the console of the debugger in the same page you get this stack trace document.importNode() and let me know what is the result?

mgiako commented 6 months ago

so I have to type "document.importNode()" in the console?

this is the result: image

mgiako commented 6 months ago

ok i got it

image

regevbr commented 6 months ago

Great I think I found a lead, I updated the gist can you please try again all the steps and let me know if that solved it, and if not send the stacktrace again

mgiako commented 6 months ago

no luck...


mini-climate-card-bundle.js:1714 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).importNode is not a function
    at TemplateInstance$4._clone (mini-climate-card-bundle.js:1714:199)
    at ChildPart$4._commitTemplateResult (mini-climate-card-bundle.js:1942:35)
    at ChildPart$4._$setValue (mini-climate-card-bundle.js:1834:16)
    at render$4 (mini-climate-card-bundle.js:2262:12)
    at MiniClimate.update (mini-climate-card-bundle.js:2323:28)
    at MiniClimate.performUpdate (mini-climate-card-bundle.js:1247:18)
    at MiniClimate.scheduleUpdate (mini-climate-card-bundle.js:1187:27)
    at mini-climate-card-bundle.js:1179:31
    at Generator.throw (<anonymous>)
    at asyncGeneratorStep (mini-climate-card-bundle.js:84:26)
_clone @ mini-climate-card-bundle.js:1714
_commitTemplateResult @ mini-climate-card-bundle.js:1942
_$setValue @ mini-climate-card-bundle.js:1834
render$4 @ mini-climate-card-bundle.js:2262
update @ mini-climate-card-bundle.js:2323
performUpdate @ mini-climate-card-bundle.js:1247
scheduleUpdate @ mini-climate-card-bundle.js:1187
(anonymous) @ mini-climate-card-bundle.js:1179
asyncGeneratorStep @ mini-climate-card-bundle.js:84
_throw @ mini-climate-card-bundle.js:106
Promise.then (async)
asyncGeneratorStep @ mini-climate-card-bundle.js:93
_next @ mini-climate-card-bundle.js:103
(anonymous) @ mini-climate-card-bundle.js:108
(anonymous) @ mini-climate-card-bundle.js:100
__enqueueUpdate @ mini-climate-card-bundle.js:1184
requestUpdate @ mini-climate-card-bundle.js:1158
set @ mini-climate-card-bundle.js:926
set hass @ mini-climate-card-bundle.js:16434
(anonymous) @ hui-view.ts:153
value @ hui-view.ts:151
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hui-root.ts:607
_$AE @ reactive-element.ts:1378
performUpdate @ reactive-element.ts:1343
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ partial-panel-resolver.ts:101
value @ hass-router-page.ts:91
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
j @ lit-html.ts:1883
_$AI @ lit-html.ts:1825
v @ lit-html.ts:1192
g @ lit-html.ts:1540
_$AI @ lit-html.ts:1384
Z @ lit-html.ts:2183
update @ lit-element.ts:165
performUpdate @ reactive-element.ts:1329
scheduleUpdate @ reactive-element.ts:1261
_$Ej @ reactive-element.ts:1233
await in _$Ej (async)
requestUpdate @ reactive-element.ts:1208
set @ reactive-element.ts:726
value @ hass-base-mixin.ts:56
_updateHass @ context-mixin.ts:95
(anonymous) @ connection-mixin.ts:227
s @ store.js:19
(anonymous) @ entities.js:74
e.subscribeMessage.type @ entities.js:76
(anonymous) @ connection.js:23
_handleMessage @ connection.js:15
regevbr commented 6 months ago

bummer, can you please try to put a breakpoint at

    at TemplateInstance$4._clone (mini-climate-card-bundle.js:1714:199)

and show me the following expresion values (you can run them in the console while on the breakpoint): options.creationScope d$4 ((_options$creationScop = options === null || options === void 0 ? void 0 : options.creationScope) !== null && _options$creationScop !== void 0 ? _options$creationScop : d$4) ShadowRoot.prototype.createElement ShadowRoot.prototype.importNode

mgiako commented 6 months ago

I'm sorry, could you explain better how to do it?

mgiako commented 6 months ago

ok I'm at breakpoint

do I have to enter the commands individually in the console?

1) options.creationScope 2) d$4 3)...

mgiako commented 6 months ago

image

mgiako commented 6 months ago

image

regevbr commented 6 months ago

Ok interesting, can you show me the value of ShadowRoot.prototype.createElement in a different website that is not your home assistant (no need to be on any breakpoints)

mgiako commented 6 months ago

image

mgiako commented 6 months ago

Hi, I tested whether the problem also exists on my other computers, same version of Chrome. They all work perfectly. So I can't bother you any further with a problem that's just mine, I thought other people might have it too and therefore it was worth investigating with you. But I'll look for the cause only on my computer, maybe reinstall chrome etc... I'm so sorry for bothering you. If I solve it I'll let you know. Thank you, see you soon

mgiako commented 6 months ago

Ok problem solved, For some reason that I don't remember at the moment I had activated the experimental features of chrome. image

If I disable them the problem goes away.

Hope this can help someone with the same problem. Thanks again @regevbr

regevbr commented 6 months ago

I was about to ask you that haha that was my conclusion as well. Lets see what the others think. Does it get solved with my latest code only or with the current code in HACS as well?

mgiako commented 6 months ago

let me check...

mgiako commented 6 months ago

To reinstall the official version, I deleted the card from hacs and verified that the /config/www/community/mini-climate-card folder no longer exists. Despite this, and no matter how many times I press ctrl-F5 to clear the cache, the card is still present in lovelace. I also restarted HA... still there.

regevbr commented 6 months ago

try with the inspeciton window open and the disable cache button checked in the network tab

mgiako commented 6 months ago

ok, finally I got the message that the card didn't exist. And I reinstalled version 2.7. It works!

mgiako commented 6 months ago

Tried again with Experimental Web Platform features, and it's confirmed, does not work. Can you replicate?

mgiako commented 6 months ago

ok, I remembered what the Experimental Web Platform features setting was for, that's why: https://github.com/pvvx/ATC_MiThermometer

It's needed to flash the bluetooth MiThermometer directly from the chrome page

https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html

regevbr commented 6 months ago

Yes managed to reproduce it. Sadly I don't have a solution currently. In HA because each card needs to have its own isolated dependency environment, I need to use an experimental polyfill feature, that stops working once you enable this chrome experimental feature.

mgiako commented 6 months ago

No big issue anyway... If someone uses this: image

Just remember to disable it after flashing

regevbr commented 6 months ago

@DaN66O @flipaz @elgeniskogen can you verify that is the same for you?

DaN66O commented 6 months ago

@DaN66O @flipaz @elgeniskogen can you verify that is the same for you?

Confirm After deactivation experimental features The card is working again

mgiako commented 6 months ago

@DaN66O @flipaz @elgeniskogen can you verify that is the same for you?

Confirm After deactivation experimental features The card is working again

Was TelinkMiFlasher for you too?