Skip to content

Commit

Permalink
Merge pull request #1 from kalhimeo/kalhimeo-patch-ha-icon
Browse files Browse the repository at this point in the history
Fix icon not showing on HA 2021.11
  • Loading branch information
kalhimeo authored Nov 4, 2021
2 parents faf0e35 + f7be25a commit 80ab3d6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/harmony-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ export class HarmonyCard extends LitElement {
?outlined="${outlined}"
@click="${e => this.harmonyCommand(e, command)}"
@touchstart="${e => this.preventBubbling(e)}"
></ha-icon-button>
><ha-icon icon="${icon}"></ha-icon>
</ha-icon-button>
`
: html`
<mwc-button
Expand Down Expand Up @@ -288,7 +289,8 @@ export class HarmonyCard extends LitElement {
icon="${buttonConfig.icon}"
style="${styleMap(buttonStyles)}"
@click="${e => this.deviceCommand(e, buttonConfig.device || device, buttonConfig.command || '')}"
@touchstart="${e => this.preventBubbling(e)}">
@touchstart="${e => this.preventBubbling(e)}"
><ha-icon icon="${buttonConfig.icon}"></ha-icon>
</ha-icon-button>
`;
}
Expand Down Expand Up @@ -322,8 +324,8 @@ export class HarmonyCard extends LitElement {

return html`
<div class="volume-controls">
<ha-icon-button style="${styleMap(volumeDownStyle)}" icon="${buttonConfig['volume_down'].icon}" @click="${e => this.volumeCommand(e, volumeMediaPlayer, 'volume_down')}" @touchstart="${e => this.preventBubbling(e)}"></ha-icon-button>
<ha-icon-button style="${styleMap(volumeUpStyle)}" icon="${buttonConfig['volume_up'].icon}" @click="${e => this.volumeCommand(e, volumeMediaPlayer, 'volume_up')}" @touchstart="${e => this.preventBubbling(e)}"></ha-icon-button>
<ha-icon-button style="${styleMap(volumeDownStyle)}" icon="${buttonConfig['volume_down'].icon}" @click="${e => this.volumeCommand(e, volumeMediaPlayer, 'volume_down')}" @touchstart="${e => this.preventBubbling(e)}"><ha-icon icon="${buttonConfig['volume_down'].icon}"></ha-icon></ha-icon-button>
<ha-icon-button style="${styleMap(volumeUpStyle)}" icon="${buttonConfig['volume_up'].icon}" @click="${e => this.volumeCommand(e, volumeMediaPlayer, 'volume_up')}" @touchstart="${e => this.preventBubbling(e)}"><ha-icon icon="${buttonConfig['volume_up'].icon}"></ha-icon-button>
<paper-slider
@change=${e => this.volumeCommand(e, volumeMediaPlayer, 'volume_set', { volume_level: e.target.value / 100 })}
@click=${e => e.stopPropagation()}
Expand All @@ -335,7 +337,7 @@ export class HarmonyCard extends LitElement {
ignore-bar-touch pin>
</paper-slider>
<ha-icon-button style="${styleMap(volumeMuteStyle)}" icon="${buttonConfig['volume_mute'].icon}" @click="${e => this.volumeCommand(e, volumeMediaPlayer, 'volume_mute', { is_volume_muted: true })}" @touchstart="${e => this.preventBubbling(e)}"></ha-icon-button>
<ha-icon-button style="${styleMap(volumeMuteStyle)}" icon="${buttonConfig['volume_mute'].icon}" @click="${e => this.volumeCommand(e, volumeMediaPlayer, 'volume_mute', { is_volume_muted: true })}" @touchstart="${e => this.preventBubbling(e)}"><ha-icon icon="${buttonConfig['volume_mute'].icon}"></ha-icon></ha-icon-button>
</div>`;
}

Expand Down

0 comments on commit 80ab3d6

Please sign in to comment.