Cannot read property 'states' of undefined
Closed this issue · 2 comments
Dilergore commented
Hello,
- My Home Assistant version: 2021.8.8
- My lovelace configuration method: yaml
- What I am doing: Seeing issues with the configured card
- What I expected to happen: No issues :)
- What happened instead: Getting "Uncaught (in promise) TypeError: Cannot read property 'states' of undefined"
Minimal steps to reproduce:
- type: custom:vertical-stack-in-card
title: Lights
cards:
- type: custom:slider-entity-row
entity: light.standinglamp_office
icon: mdi:floor-lamp
name: "Standing Lamp"
toggle: true
min: 1
hide_when_off: true
style: |
ha-card.type-custom-vertical-stack-in-card {
padding: 16px;
}
Error messages from the browser console:
Uncaught (in promise) TypeError: Cannot read property 'states' of undefined
at nt.set hass [as hass] (slider-entity-row.js:1)
at HTMLElement.render (slider-entity-row.js:7)
at HTMLElement.update (slider-entity-row.js:1)
at HTMLElement.performUpdate (slider-entity-row.js:1)
at HTMLElement._enqueueUpdate (slider-entity-row.js:1)
The entity is existing and it is light group. When the page loads it takes 1-2 seconds to the rows to display, then they work fine.
Dilergore commented
I started to see another issue as well:
slider-entity-row.js:7 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'clientWidth') at HTMLElement.resized (slider-entity-row.js:7) at async HTMLElement.firstUpdated (slider-entity-row.js:7)
thomasloven commented
The readme says
Add this to an entities card:
All other usage is unsupported.