Skip to content

Commit

Permalink
Pass "hass" to <state-badge>
Browse files Browse the repository at this point in the history
  • Loading branch information
amitfin committed Feb 12, 2024
1 parent 858fc76 commit 1676f95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daily-schedule-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class DailyScheduleCard extends HTMLElement {

_updateContent() {
for (const row of this._content._rows) {
row._content._icon.hass = this._hass;
row._content._icon.stateObj = this._hass.states[row._entity];
this._setCardRowValue(row);
}
Expand All @@ -84,6 +85,7 @@ class DailyScheduleCard extends HTMLElement {
content.style.gap = "16px";
const icon = document.createElement("state-badge");
icon.style.flex = "none";
icon.hass = this._hass;
icon.stateObj = this._hass.states[entity];
icon.stateColor = true;
content._icon = icon;
Expand Down

0 comments on commit 1676f95

Please sign in to comment.