-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read properties of undefined (reading 'length') #960
Comments
That might be related to the way, HA reports history. I believe, if we ask it "what is the history of the last hour?", it will respond with "nothing" if there were no changes. If we want to fix that, we have to also ask it "What's the current state", and just use that in a flat line. Not sure, if that's already what we're doing. If it's not, it will be quite some code change. Then, just displaying a message instead of the graph might be easier: "no changes in the last X hours". |
I just upgraded to 0.12.dev version - and got these "no graph displayed" issues for MANY of my graphs.
This will be absolutely not informative, 99% of users will expect flat lines in this case. |
Hmm... OK. So it's good I didn't fire the release script on the master branch. 😆 |
It might be my change here: 527f005 That's the only difference in |
This re-insures the logic to keep the last known state before the start of our grah interval within the history. While this is not really correct, it allows for rendering state-state-graphs. This element was mistakenly removed in kalkih#881. The piece of code relies on history being chronographical. fixes kalkih#960
This re-insures the logic to keep the last known state before the start of our grah interval within the history. While this is not really correct, it allows for rendering steady-state-graphs. This element was mistakenly removed in kalkih#881. The piece of code relies on history being chronographical. fixes kalkih#960
Seems to be solved by #961 (changes not yet added to a release) |
This re-insures the logic to keep the last known state before the start of our grah interval within the history. While this is not really correct, it allows for rendering steady-state-graphs. This element was mistakenly removed in #881. The piece of code relies on history being chronographical. fixes #960
🎉 This issue has been resolved in version 0.12.0-dev.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [0.12.0](v0.11.0...v0.12.0) (2024-01-27) ### Bug Fixes * add first datapoint tooltip for line graph ([#882](#882)) ([7576fe6](7576fe6)) * allow zero tooltip ([057a395](057a395)), closes [#805](#805) * cards would always assume icon_image was set ([#957](#957)) ([f376732](f376732)) * drop out-of-bound coords in reducer ([#881](#881)) ([527f005](527f005)), closes [#251](#251) * retain the last out-of-bounds state ([#961](#961)) ([8ebe173](8ebe173)), closes [#881](#881) [#960](#960) * **documentation:** enquote html color ([dbdeab8](dbdeab8)), closes [#872](#872) * **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f)) * **workflows:** remove invalid description field ([e755e24](e755e24)) ### Features * Add support of attribute tree when available ([#996](#996)) ([9c1c31e](9c1c31e)) * pull two years worth of changes into release channel ([f5fb98d](f5fb98d)), closes [#1059](#1059) * **option:** override icon with an image URL ([#789](#789)) ([2860a09](2860a09))
🎉 This issue has been resolved in version 0.12.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# 1.0.0 (2024-12-15) ### Bug Fixes * add first datapoint tooltip for line graph ([kalkih#882](https://github.com/motorlatitude/mini-graph-card/issues/882)) ([7576fe6](7576fe6)) * allow zero tooltip ([057a395](057a395)), closes [kalkih#805](https://github.com/motorlatitude/mini-graph-card/issues/805) * cards would always assume icon_image was set ([kalkih#957](https://github.com/motorlatitude/mini-graph-card/issues/957)) ([f376732](f376732)) * display a warning if entity is not available ([kalkih#545](https://github.com/motorlatitude/mini-graph-card/issues/545)) ([a334b84](a334b84)), closes [kalkih#487](https://github.com/motorlatitude/mini-graph-card/issues/487) * drop out-of-bound coords in reducer ([kalkih#881](https://github.com/motorlatitude/mini-graph-card/issues/881)) ([527f005](527f005)), closes [kalkih#251](https://github.com/motorlatitude/mini-graph-card/issues/251) * Fix undefined variable introduced by [kalkih#545](https://github.com/motorlatitude/mini-graph-card/issues/545) ([9e923f5](9e923f5)) * icon will properly follow entity's device_class [[kalkih#484](https://github.com/motorlatitude/mini-graph-card/issues/484)] ([2f9e0a7](2f9e0a7)) * retain the last out-of-bounds state ([kalkih#961](https://github.com/motorlatitude/mini-graph-card/issues/961)) ([8ebe173](8ebe173)), closes [kalkih#881](https://github.com/motorlatitude/mini-graph-card/issues/881) [kalkih#960](https://github.com/motorlatitude/mini-graph-card/issues/960) * Support for `fire-dom-event` ([c29f55f](c29f55f)), closes [kalkih#563](https://github.com/motorlatitude/mini-graph-card/issues/563) * tooltip interval start could be after end ([kalkih#1065](https://github.com/motorlatitude/mini-graph-card/issues/1065)) ([930ee39](930ee39)), closes [kalkih#181](https://github.com/motorlatitude/mini-graph-card/issues/181) * **config:** Remove entity config error [kalkih#592](https://github.com/motorlatitude/mini-graph-card/issues/592) ([kalkih#593](https://github.com/motorlatitude/mini-graph-card/issues/593)) ([53d923a](53d923a)) * **documentation:** enquote html color ([dbdeab8](dbdeab8)), closes [kalkih#872](https://github.com/motorlatitude/mini-graph-card/issues/872) * **log:** color_thresholds render incorectly with logaritmic on ([kalkih#542](https://github.com/motorlatitude/mini-graph-card/issues/542)) ([b704885](b704885)), closes [kalkih#531](https://github.com/motorlatitude/mini-graph-card/issues/531) * **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f)) * **workflows:** remove invalid description field ([e755e24](e755e24)) * Time would sometime display 24:xx instead of 00:xx [[kalkih#536](https://github.com/motorlatitude/mini-graph-card/issues/536)] ([7c7d921](7c7d921)) ### Features * Add support of attribute tree when available ([kalkih#996](https://github.com/motorlatitude/mini-graph-card/issues/996)) ([9c1c31e](9c1c31e)) * Interpolate color threshold stops ([kalkih#596](https://github.com/motorlatitude/mini-graph-card/issues/596)) ([3826c0d](3826c0d)) * pull two years worth of changes into release channel ([f5fb98d](f5fb98d)), closes [kalkih#1059](https://github.com/motorlatitude/mini-graph-card/issues/1059) * **attribute:** Retrieve an attribute instead of the state ([kalkih#564](https://github.com/motorlatitude/mini-graph-card/issues/564)) ([708bfde](708bfde)), closes [kalkih#411](https://github.com/motorlatitude/mini-graph-card/issues/411) [kalkih#245](https://github.com/motorlatitude/mini-graph-card/issues/245) [kalkih#501](https://github.com/motorlatitude/mini-graph-card/issues/501) * **graph:** Add median aggregate function ([kalkih#521](https://github.com/motorlatitude/mini-graph-card/issues/521)) ([57219bd](57219bd)) * **option:** override icon with an image URL ([kalkih#789](https://github.com/motorlatitude/mini-graph-card/issues/789)) ([2860a09](2860a09)) * Format numbers according to selected language [[kalkih#495](https://github.com/motorlatitude/mini-graph-card/issues/495) [kalkih#509](https://github.com/motorlatitude/mini-graph-card/issues/509)] ([5785bd8](5785bd8))
0.12.0-dev.2
Observe this error in Browser console for ALL entities which were not changed within a selected period:
hours_to_show
)input_number
helper was not changed for a long time.Consider this card:
Now the graph is not displayed, same errors in the console:
![изображение](https://user-images.githubusercontent.com/71872483/234386722-c8e6db6e-a546-4310-8804-b4b8ccf073e6.png)
![изображение](https://user-images.githubusercontent.com/71872483/234386760-446b1d61-6fc5-49cf-b35c-5c48c8104110.png)
Change the helper's value - then the graph will be displayed w/o errors:
The text was updated successfully, but these errors were encountered: