Skip to content

Commit

Permalink
add to card picker
Browse files Browse the repository at this point in the history
  • Loading branch information
chilikla authored Oct 16, 2024
1 parent 8e2e916 commit 72251bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/card/yerushamayim-card-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,12 @@ class YerushamayimCard extends LitElement {
}
}

customElements.define('yerushamayim-card', YerushamayimCard);
customElements.define('yerushamayim-card', YerushamayimCard);
window.customCards = window.customCards || [];
window.customCards.push({
type: "yerushamayim-card",
name: "Yerushamayim Weather Card",
preview: true,
description: "Unofficial Yerushamayim Home Assistant dashboard card",
documentationURL: "https://github.com/chilikla/yerushamayim-card"
});
9 changes: 8 additions & 1 deletion src/card/yerushamayim-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class YerushamayimCard extends LitElement {
render() {
const entityId = this.config.entity;
const state = this.hass.states[entityId];
console.log("states", this.hass.states);
const stateStr = state ? state.state : 'unavailable';
const logUrl = this.hass.states['sun.sun'].state === 'below_horizon' ? 'https://www.02ws.co.il/img/logo_night.png' : 'https://www.02ws.co.il/img/logo.png';

Expand Down Expand Up @@ -173,3 +172,11 @@ class YerushamayimCard extends LitElement {
}

customElements.define('yerushamayim-card', YerushamayimCard);
window.customCards = window.customCards || [];
window.customCards.push({
type: "yerushamayim-card",
name: "Yerushamayim Weather Card",
preview: true,
description: "Unofficial Yerushamayim Home Assistant dashboard card",
documentationURL: "https://github.com/chilikla/yerushamayim-card"
});

0 comments on commit 72251bd

Please sign in to comment.