UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.64k stars 432 forks source link

Thermostat card has empty popup #1089

Open stiw47 opened 1 year ago

stiw47 commented 1 year ago

Describe the bug As in the title.

To Reproduce Click on Thermostat card icon to call the popup.

Expected behavior Thermostat popup should appear, together with slider, controls, etc.

Screenshots

image

Additional context Instructed to open the issue by @basbruss here.

Please find below the logs and conf requested. Please let me know if you need some additional info, the card and the popup card are default ones, i.e:

/config/workspace/custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/card_templates/cards/card_thermostat.yaml

and

/config/workspace/custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml

Browser’s dev-console log (this log was generated just with single click on card icon, i.e. call the popup):

anonymous@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342 line 425 > Function:3:16
_evalTemplate@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9379
_getTemplateOrValue@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9964
_getTemplateOrValue/<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9857
_getTemplateOrValue@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9834
_getTemplateOrValue/<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9857
_getTemplateOrValue@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9834
_getTemplateOrValue/<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9857
_getTemplateOrValue@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9834
_getTemplateOrValue/<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9857
_getTemplateOrValue@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9834
_getTemplateOrValue/<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9857
_getTemplateOrValue@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9834
_getTemplateOrValue/<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9857
_getTemplateOrValue@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9834
_objectEvalTemplate@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:9673
_buildCustomFields/<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:433:360
_buildCustomFields@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:433:292
_gridHtml@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:517:25
_buttonContent@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:499:433
_cardHtml@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:479:18
render@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:6916
update@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:19896
performUpdate@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:16782
_enqueueUpdate@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:16434
async*requestUpdateInternal@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:16224
initialize@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:14579
initialize@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:19183
G@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:12483
nt@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:18595
Je@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:425:4846
E@http://192.168.0.21:8123/frontend_latest/app.0706b45e.js:850:118543
t@http://192.168.0.21:8123/frontend_latest/app.0706b45e.js:850:116675
a@http://192.168.0.21:8123/frontend_latest/2ff0ecbb.js:1212:4399
7778/u/<@http://192.168.0.21:8123/frontend_latest/2ff0ecbb.js:1212:4863
u@http://192.168.0.21:8123/frontend_latest/2ff0ecbb.js:1212:5125
d@http://192.168.0.21:8123/frontend_latest/2ff0ecbb.js:1212:4542
g@http://192.168.0.21:8123/frontend_latest/2ff0ecbb.js:1212:3873
_build_card@http://192.168.0.21:8123/browser_mod.js:66:23518
async*setupDialog@http://192.168.0.21:8123/browser_mod.js:66:24642
showPopup/<@http://192.168.0.21:8123/browser_mod.js:219:1488
showPopup@http://192.168.0.21:8123/browser_mod.js:219:1534
_service_action@http://192.168.0.21:8123/browser_mod.js:66:19035
@http://192.168.0.21:8123/browser_mod.js:66:17708
It@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:27865
Gt@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:31756
_handleTap@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:547:4619
_handleAction@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:547:4488
handleEvent@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:9239
N/this.__boundHandleEvent@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:8618
Xt@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:34317
bind/t.actionHandler.end/this.dblClickTimeout<@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:37920
setTimeout handler*bind/t.actionHandler.end@http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342:1:37875
[button-card.js:425:6953](http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342)
    render button-card.js:425
    update button-card.js:1
    performUpdate button-card.js:1
    _enqueueUpdate button-card.js:1
    requestUpdateInternal button-card.js:1
    initialize button-card.js:1
    initialize button-card.js:1
    G button-card.js:1
    nt button-card.js:1
    Je button-card.js:425
    E typography.js:181
    t typography.js:181
    a ha-logbook.ts:42
    u ha-logbook.ts:42
    u ha-logbook.ts:42
    d ha-logbook.ts:42
    g ha-logbook.ts:42
    _build_card browser_mod.js:66
    setupDialog browser_mod.js:66
    showPopup browser_mod.js:219
    showPopup browser_mod.js:219
    _service_action browser_mod.js:66
    <anonymous> browser_mod.js:66
    It button-card.js:1
    Gt button-card.js:1
    _handleTap button-card.js:547
    _handleAction button-card.js:547
    handleEvent button-card.js:1
    __boundHandleEvent button-card.js:1
    Xt button-card.js:1
    dblClickTimeout button-card.js:1
    (Async: setTimeout handler)
    end button-card.js:1
Uncaught (in promise) TypeError: e.setConfig is not a function
    render button-card.js:425
    update button-card.js:1
    performUpdate button-card.js:1
    _enqueueUpdate button-card.js:1
    requestUpdateInternal button-card.js:1
    initialize button-card.js:1
    initialize button-card.js:1
    G button-card.js:1
    nt button-card.js:1
    Je button-card.js:425
    E typography.js:181
    t typography.js:181
    a ha-logbook.ts:42
    u ha-logbook.ts:42
    u ha-logbook.ts:42
    d ha-logbook.ts:42
    g ha-logbook.ts:42
    _build_card browser_mod.js:66
    setupDialog browser_mod.js:66
    showPopup browser_mod.js:219
    showPopup browser_mod.js:219
    _service_action browser_mod.js:66
    <anonymous> browser_mod.js:66
    It button-card.js:1
    Gt button-card.js:1
    _handleTap button-card.js:547
    _handleAction button-card.js:547
    handleEvent button-card.js:1
    __boundHandleEvent button-card.js:1
    Xt button-card.js:1
    dblClickTimeout button-card.js:1
    setTimeout handler*bind/t.actionHandler.end button-card.js:1
[button-card.js:425:7043](http://192.168.0.21:8123/hacsfiles/button-card/button-card.js?hacstag=146194325342)
    _enqueueUpdate button-card.js:1
    AsyncFunctionNext self-hosted:807
    (Async: async)
    requestUpdateInternal button-card.js:1
    initialize button-card.js:1
    initialize button-card.js:1
    G button-card.js:1
    nt button-card.js:1
    Je button-card.js:425
    E typography.js:181
    t typography.js:181
    a ha-logbook.ts:42
    u ha-logbook.ts:42
    u ha-logbook.ts:42
    d ha-logbook.ts:42
    g ha-logbook.ts:42
    _build_card browser_mod.js:66
    InterpretGeneratorResume self-hosted:1819
    AsyncFunctionNext self-hosted:807
    (Async: async)
    setupDialog browser_mod.js:66
    showPopup browser_mod.js:219
    showPopup browser_mod.js:219
    _service_action browser_mod.js:66
    <anonymous> browser_mod.js:66
    It button-card.js:1
    Gt button-card.js:1
    _handleTap button-card.js:547
    _handleAction button-card.js:547
    handleEvent button-card.js:1
    __boundHandleEvent button-card.js:1
    Xt button-card.js:1
    dblClickTimeout button-card.js:1
    (Async: setTimeout handler)
    end button-card.js:1

Thermostat Card on lovelace:

      - type: "custom:button-card"
        template: card_thermostat
        entity: climate.ac_living_room
        variables:
          ulm_card_thermostat_name: Klima
          ulm_card_thermostat_icon: mdi:thermometer
          ulm_card_thermostat_enable_collapse: false
          ulm_card_thermostat_enable_controls: true
          ulm_card_thermostat_enable_hvac_modes: true
          ulm_card_thermostat_enable_popup: true
          ulm_card_thermostat_enable_background_color: false
          ulm_card_thermostat_enable_display_temperature: true
V4n1X commented 1 year ago

Does other custom pop up cards work like the light card? Because I have this error also on the light card.

stiw47 commented 1 year ago

Hey, yes, sorry I forgot to mention above. I already commented regarding that here (and in above posts), my Light Card popup is working as expected.

billyjoebob999 commented 1 year ago

I'm having issues with this as well. Light and media pop ups work just fine. I can generally get it working by replacing the template code but after rebooting HA it will stop working again.

LOGS: button-card.js?hacstag=146194325342:425 ButtonCardJSTemplateError: TypeError: entity.attributes.hvac_modes.toLowerCase is not a function in 'var areas = []; if (variables.ulm_card_thermostat_preset_mode){ if (entity.attribute...' at Je.eval (eval at _evalTemplate (button-card.js?hacstag=146194325342:425:9295), :25:42) at Je._evalTemplate (button-card.js?hacstag=146194325342:425:9379) at Je._getTemplateOrValue (button-card.js?hacstag=146194325342:425:9964) at button-card.js?hacstag=146194325342:425:9857 at Array.forEach () at Je._getTemplateOrValue (button-card.js?hacstag=146194325342:425:9834) at button-card.js?hacstag=146194325342:425:9857 at Array.forEach () at Je._getTemplateOrValue (button-card.js?hacstag=146194325342:425:9834) at button-card.js?hacstag=146194325342:425:9857 render @ button-card.js?hacstag=146194325342:425 update @ button-card.js?hacstag=146194325342:1 performUpdate @ button-card.js?hacstag=146194325342:1 _enqueueUpdate @ button-card.js?hacstag=146194325342:1 await in _enqueueUpdate (async) requestUpdateInternal @ button-card.js?hacstag=146194325342:1 initialize @ button-card.js?hacstag=146194325342:1 initialize @ button-card.js?hacstag=146194325342:1 G @ button-card.js?hacstag=146194325342:1 nt @ button-card.js?hacstag=146194325342:1 Je @ button-card.js?hacstag=146194325342:425 E @ typography.js:181 t @ typography.js:181 a @ ha-card.ts:5 (anonymous) @ ha-card.ts:5 u @ ha-card.ts:5 d @ ha-card.ts:5 g @ hui-error-badge.ts:22 _build_card @ browser_mod.js:66 await in _build_card (async) setupDialog @ browser_mod.js:66 (anonymous) @ browser_mod.js:219 showPopup @ browser_mod.js:219 _service_action @ browser_mod.js:66 (anonymous) @ browser_mod.js:66 It @ button-card.js?hacstag=146194325342:1 Gt @ button-card.js?hacstag=146194325342:1 _handleTap @ button-card.js?hacstag=146194325342:547 _handleAction @ button-card.js?hacstag=146194325342:547 handleEvent @ button-card.js?hacstag=146194325342:1 N.boundHandleEvent @ button-card.js?hacstag=146194325342:1 Xt @ button-card.js?hacstag=146194325342:1 (anonymous) @ button-card.js?hacstag=146194325342:1 setTimeout (async) t.actionHandler.e.disabled.t.actionHandler.end @ button-card.js?hacstag=146194325342:1 button-card.js?hacstag=146194325342:425 ButtonCardJSTemplateError: TypeError: entity.attributes.hvac_modes.toLowerCase is not a function in 'var areas = []; if (variables.ulm_card_thermostat_preset_mode){ if (entity.attribute...' at Je.eval (eval at _evalTemplate (button-card.js?hacstag=146194325342:425:9295), :25:42) at Je._evalTemplate (button-card.js?hacstag=146194325342:425:9379) at Je._getTemplateOrValue (button-card.js?hacstag=146194325342:425:9964) at button-card.js?hacstag=146194325342:425:9857 at Array.forEach () at Je._getTemplateOrValue (button-card.js?hacstag=146194325342:425:9834) at button-card.js?hacstag=146194325342:425:9857 at Array.forEach () at Je._getTemplateOrValue (button-card.js?hacstag=146194325342:425:9834) at button-card.js?hacstag=146194325342:425:9857 render @ button-card.js?hacstag=146194325342:425 update @ button-card.js?hacstag=146194325342:1 performUpdate @ button-card.js?hacstag=146194325342:1 _enqueueUpdate @ button-card.js?hacstag=146194325342:1 await in _enqueueUpdate (async) requestUpdateInternal @ button-card.js?hacstag=146194325342:1 initialize @ button-card.js?hacstag=146194325342:1 initialize @ button-card.js?hacstag=146194325342:1 G @ button-card.js?hacstag=146194325342:1 nt @ button-card.js?hacstag=146194325342:1 Je @ button-card.js?hacstag=146194325342:425 E @ typography.js:181 t @ typography.js:181 a @ ha-card.ts:5 (anonymous) @ ha-card.ts:5 u @ ha-card.ts:5 d @ ha-card.ts:5 g @ hui-error-badge.ts:22 _build_card @ browser_mod.js:66 await in _build_card (async) setupDialog @ browser_mod.js:66 (anonymous) @ browser_mod.js:219 showPopup @ browser_mod.js:219 _service_action @ browser_mod.js:66 (anonymous) @ browser_mod.js:66 It @ button-card.js?hacstag=146194325342:1 Gt @ button-card.js?hacstag=146194325342:1 _handleTap @ button-card.js?hacstag=146194325342:547 _handleAction @ button-card.js?hacstag=146194325342:547 handleEvent @ button-card.js?hacstag=146194325342:1 N.boundHandleEvent @ button-card.js?hacstag=146194325342:1 Xt @ button-card.js?hacstag=146194325342:1 (anonymous) @ button-card.js?hacstag=146194325342:1 setTimeout (async) t.actionHandler.e.disabled.t.actionHandler.end @ button-card.js?hacstag=146194325342:1