diff --git a/README.md b/README.md index c123f364..e943d2bf 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,8 @@ All properties are optional. | labels_secondary | `hover` | `true` / `false` / `hover` | Display secondary Y-axis labels. | name_adaptive_color | `false` | `true` / `false` | Make the name color adapt with the primary entity color. | icon_adaptive_color | `false` | `true` / `false` | Make the icon color adapt with the primary entity color. +| loading_indicator | `true` | `true` / `false` | Show loading indicator while attempting to retrieve a history. + #### Line color object See [dynamic line color](#dynamic-line-color) for example usage. diff --git a/src/main.js b/src/main.js index 978f6768..10fd9922 100644 --- a/src/main.js +++ b/src/main.js @@ -323,8 +323,11 @@ class MiniGraphCard extends LitElement { } renderGraph() { - const ready = this.entity[0] && this.Graph[0]._history !== undefined; - + const ready = (this.entity[0] && !this.Graph.some( + (element, index) => element._history === undefined + && this.config.entities[index].show_graph !== false, + )) + || this.config.show.loading_indicator === false; return this.config.show.graph ? html`
${ready ? html`