enriqg9 / dual-thermostat

Dual Thermostat Lovelace Card
MIT License
51 stars 20 forks source link

Card no longer loading #18

Closed egeekial closed 5 years ago

egeekial commented 5 years ago

Running Home Assistant 0.99.0 (0.98.5 also did not work). The card no longer shows up in Lovelace, and I get this error in the browser console:

Uncaught (in promise) TypeError: Cannot read property 'indexOf' of undefined
    at HTMLElement.renderFanControl (dual-thermostat.js?v=1:215)
    at HTMLElement.render (dual-thermostat.js?v=1:197)
    at HTMLElement.update (dual-thermostat.js?v=1:136)
    at HTMLElement._validate (dual-thermostat.js?v=1:108)
    at HTMLElement._invalidate (dual-thermostat.js?v=1:108)
enriqg9 commented 5 years ago

Can you test with HA 0.100.2? Seems to be working on my end.

natedzl commented 5 years ago

I too can not get the card to load on HA 0.100.2.

enriqg9 commented 5 years ago

Can you share your Lovelace config? What error do you have on the console?

Bunnywinkles commented 5 years ago

Try doing a forced refresh of the browser/clear cookies. That took care of my issue.

natedzl commented 5 years ago

Clearing cache and cookies didn't seem to do anything for me. I've never had this card installed before, just trying to use it for the first time. Other custom cards seem to work fine for me.

Lovelace Resources Config:

  - url: /local/community/dual-thermostat/dual-thermostat.js?v-1
    type: js

Lovelace manual card config:

type: 'custom:dual-thermostat'
name: Katie's Room
entities:
  - entity: climate.katie_s_bedroom
    type: cool
  - entity: climate.katie_s_bedroom_heater
    type: heat
fan_control: true
min_slider: 60
max_slider: 80

Error:

dual-thermostat.js?v-1:215 Uncaught (in promise) TypeError: Cannot read property 'indexOf' of undefined
    at HTMLElement.renderFanControl (dual-thermostat.js?v-1:215)
    at HTMLElement.render (dual-thermostat.js?v-1:197)
    at HTMLElement.update (dual-thermostat.js?v-1:136)
    at HTMLElement._validate (dual-thermostat.js?v-1:108)
    at HTMLElement._invalidate (dual-thermostat.js?v-1:108)

I don't get any further errors in the card editor, just white space where the preview should be:

image

Saving also results in the same.

garyt72 commented 5 years ago

I'm also having issues with the card displaying properly in 0.100.2 and 0.100.3 the strange thing for me is that it displays properly in the card editor (after several seconds):

2019-10-24 22_43_24-Home Assistant

But does not display properly after saving/closing the card editor: 2019-10-24 22_44_26-Home Assistant

I have also cleared all browsing history and cache, and done a force reload.

enriqg9 commented 5 years ago

@natedzl Check if setting fan control to false helps. @garyt72 Add the card outside of the entities card and see if that does it.

natedzl commented 5 years ago

@enriqg9 Setting fan control to false did allow the card to load, however, now I've got the same exact issue as garyt72.

garyt72 commented 5 years ago

Moving it outside of the entities card fixed the issue. I ended up putting it in vertical stack with the entities card under it, and that is working fine also.