Skip to content

Commit

Permalink
Additional debug data
Browse files Browse the repository at this point in the history
  • Loading branch information
gadgetchnnel committed Apr 13, 2020
1 parent af20f3c commit 8ea8431
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lovelace-home-feed-card.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,10 @@ class HomeFeedCard extends LitElement {
let cachedHistory = localStorage.getItem('home-feed-card-history' + this.cacheId);
let debugData = "## Debug Information\n\n"+
"**Cache Id:** " + this.cacheId + "\n\n"+
"**Cache Status:** " + (cachedHistory ? "From Cache" : "Live");
"**Cache Status:** " + (cachedHistory ? "From Cache" : "Live") + "\n\n"+
"**Language (Home Assistant):** " + (this._hass ? this._hass.language : "unknown") + "\n\n"+
"**Language (Browser):** " + (this.browser_language ? this.browser_language : "unknown");

return [{ state: "on",
attributes: {device_class: "debug"},
icon: "mdi:bug",
Expand Down Expand Up @@ -1004,7 +1007,7 @@ class HomeFeedCard extends LitElement {
</div>
<div class="item-content ${contentClass}" .item=${n} @click=${clickable ? this._handleClick : null}>
${this.itemContent(n, compact_mode, contentText)}
${n.item_type != "unavailable" ? timeItem : null}
${n.item_type != "unavailable" && n.entity_id != "home_feed.debug_info" ? timeItem : null}
</div>
</div>
${compact_mode ? html`` : html`<hr style="clear:both;"/>`}
Expand Down

0 comments on commit 8ea8431

Please sign in to comment.