diff --git a/rotel-card.js b/rotel-card.js index 842f22f..303b4b9 100644 --- a/rotel-card.js +++ b/rotel-card.js @@ -8,7 +8,7 @@ class ROTELCardServices extends LitElement { return { hass: {}, _config: {}, - _apps: {} + _apps: {}, }; } @@ -43,7 +43,8 @@ class ROTELCardServices extends LitElement { return html` ${this.renderStyle()} - +
+
${ this._config.receiver || this._config.invisible || @@ -54,43 +55,41 @@ class ROTELCardServices extends LitElement { .action="${"power-off"}" @click="${this.handleActionClick}" title="Power Off" - > + > + > - + > + ` : "" } -
- > - > - > -
@@ -99,7 +98,6 @@ class ROTELCardServices extends LitElement { @click="${this.handleActionClick}" title="Up" > - >
@@ -108,20 +106,16 @@ class ROTELCardServices extends LitElement { @click="${this.handleActionClick}" title="Left" > - > - > - > -
@@ -130,33 +124,32 @@ class ROTELCardServices extends LitElement { @click="${this.handleActionClick}" title="Down" > - >
${ - this._config.receiver && ( - this._config.volume_up || - this._config.volume_down || - this._config.volume_mute ) + this._config.receiver && + (this._config.volume_up || + this._config.volume_down || + this._config.volume_mute) ? html`
+ > + > + >
` @@ -189,7 +182,7 @@ class ROTELCardServices extends LitElement { width: 64px; height: 64px; cursor: pointer; - --mdc-icon-size: 100%; + --mdc-icon-size: 100%; } .row { display: flex; @@ -206,7 +199,7 @@ class ROTELCardServices extends LitElement { launchApp(e) { this.hass.callService("media_player", "select_source", { entity_id: this._config.entity, - source: e.currentTarget.value + source: e.currentTarget.value, }); } @@ -223,9 +216,9 @@ class ROTELCardServices extends LitElement { "down", "power-off", "sinput-tv", - "sinput-bluray", + "sinput-bluray", "sinput-phono", - "sinput-cd" + "sinput-cd", ]; if ( @@ -267,7 +260,7 @@ class ROTELCardServices extends LitElement { const styles = Object.assign({}, element._themes); if (themeName !== "default") { var theme = themes.themes[themeName]; - Object.keys(theme).forEach(key => { + Object.keys(theme).forEach((key) => { var prefixedKey = "--" + key; element._themes[prefixedKey] = ""; styles[prefixedKey] = theme[key];