diff --git a/src/panels/lovelace/cards/hui-history-graph-card.ts b/src/panels/lovelace/cards/hui-history-graph-card.ts index 4ec01f79c8..64e7809e18 100644 --- a/src/panels/lovelace/cards/hui-history-graph-card.ts +++ b/src/panels/lovelace/cards/hui-history-graph-card.ts @@ -11,6 +11,7 @@ import { classMap } from "lit/directives/class-map"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/chart/state-history-charts"; import "../../../components/ha-card"; +import "../../../components/ha-alert"; import { computeHistory, HistoryResult, @@ -192,10 +193,10 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard { > ${this._error ? html` -
- ${this.hass.localize("ui.components.history_charts.error")} : + + ${this.hass.localize("ui.components.history_charts.error")}: ${this._error.message || this._error.code} -
+ ` : html` Promise) | void>; @@ -139,7 +140,10 @@ class HuiMapCard extends LitElement implements LovelaceCard { return nothing; } if (this._error) { - return html`
${this._error}
`; + return html` + ${this.hass.localize("ui.components.map.error")}: ${this._error.message} + (${this._error.code}) + `; } return html` diff --git a/src/translations/en.json b/src/translations/en.json index c1bc0d2dd2..9ead70fea5 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -491,6 +491,9 @@ "no_history_found": "No state history found.", "error": "Unable to load history" }, + "map": { + "error": "Unable to load map" + }, "statistics_charts": { "loading_statistics": "Loading statistics…", "no_statistics_found": "No statistics found.",