Open dusan-ivanco opened 4 months ago
Show a screenshot with a card in the native HA editor and with this error.
Also, the error which you posted contains a "graph-card.js" filename - but the card's filename is "mini-graph-card-bundle.js". Are you sure that the error is related? Have you manually edited the original js-file?
Update: managed to reproduce it with a simple config:
type: custom:mini-graph-card
show:
state: last
entities:
- entity: sensor.xiaomi_cg_1_temperature
- entity: sensor.xiaomi_cg_2_temperature
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
at Kd.getEntityState (mini-graph-card-bundle.js?hacstag=1512800620120:1:100443)
at Kd.renderState (mini-graph-card-bundle.js?hacstag=1512800620120:1:100638)
at Kd.renderStates (mini-graph-card-bundle.js?hacstag=1512800620120:1:100127)
at Kd.render (mini-graph-card-bundle.js?hacstag=1512800620120:1:99132)
at Kd.update (mini-graph-card-bundle.js?hacstag=1512800620120:1:49160)
at Kd.performUpdate (mini-graph-card-bundle.js?hacstag=1512800620120:1:46377)
at mini-graph-card-bundle.js?hacstag=1512800620120:1:46037
at Generator.next (<anonymous>)
at R (mini-graph-card-bundle.js?hacstag=1512800620120:1:17743)
at f (mini-graph-card-bundle.js?hacstag=1512800620120:1:17926)
and it is rather erratic.
In fact, it seems to be about state: last
.
Suggest to retest with a simplified code & then rename the issue to reflect a possible cause.
works:
not:
Yes, I renamed the js file.
yes, option "points: false" is in conflict with "state: last"
It might be addressed by this PR: https://github.com/kalkih/mini-graph-card/pull/1075 ?
show_points: false make exception