Skip to content

Commit

Permalink
Entire card template
Browse files Browse the repository at this point in the history
  • Loading branch information
amitfin committed May 24, 2023
1 parent 694ec1a commit 32caef5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions daily-schedule-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DailyScheduleCard extends HTMLElement {
const entity = entry.entity || entry;
const row = document.createElement("DIV");
row._entity = entity;
row._template_value = entry.template;
row._template_value = entry.template || this._config.template;
row.classList.add("card-content");
if (this._hass.states[entity]) {
const content = this._createCardRow(
Expand Down Expand Up @@ -125,7 +125,8 @@ class DailyScheduleCard extends HTMLElement {
_rowTemplateValue(row) {
const subscribed = this._hass.connection.subscribeMessage(
(message) => {
row._content._value_element.innerHTML = message.result;
row._content._value_element.innerHTML =
message.result.length ? message.result : "∅";
subscribed.then((unsub) => unsub());
},
{
Expand Down

0 comments on commit 32caef5

Please sign in to comment.