We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23dfb61 commit 74f90fdCopy full SHA for 74f90fd
predbat-table-card.js
@@ -83,8 +83,14 @@ class PredbatTableCard extends HTMLElement {
83
84
85
const entityId = this.config.entity;
86
+
87
const state = hass.states[entityId];
88
const stateStr = state ? state.state : "unavailable";
89
90
+ if (stateStr === "unavailable") {
91
+ throw new Error("Predbat HTML entity is not currently available");
92
+ }
93
94
let columnsToReturn = this.config.columns;
95
let rawHTML = hass.states[entityId].attributes.html;
96
const dataArray = this.getArrayDataFromHTML(rawHTML, hass.themes.darkMode);
0 commit comments