Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/harmony-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ export class HarmonyCard extends LitElement {
var buttonStyles = Object.assign(styles || {}, { color: buttonConfig.color });

return html`
<paper-icon-button
<ha-icon-button
icon="${buttonConfig.icon}"
style="${styleMap(buttonStyles)}"
@click="${e => this.deviceCommand(e, buttonConfig.device || device, buttonConfig.command || '')}"
@touchstart="${e => this.preventBubbling(e)}">
</paper-icon-button>
</ha-icon-button>
`;
}

Expand Down Expand Up @@ -254,8 +254,8 @@ export class HarmonyCard extends LitElement {

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

<paper-icon-button style="${styleMap(volumeMuteStyle)}" icon="${buttonConfig['volume_mute'].icon}" @click="${e => this.volumeCommand(e, 'volume_mute', { is_volume_muted: true })}" @touchstart="${e => this.preventBubbling(e)}"></paper-icon-button>
<ha-icon-button style="${styleMap(volumeMuteStyle)}" icon="${buttonConfig['volume_mute'].icon}" @click="${e => this.volumeCommand(e, 'volume_mute', { is_volume_muted: true })}" @touchstart="${e => this.preventBubbling(e)}"></ha-icon-button>
</div>`;
}

Expand Down
6 changes: 3 additions & 3 deletions src/sharedStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ const sharedStyle = css`
width: calc(var(--mmp-unit) * .6);
height: calc(var(--mmp-unit) * .6);
}
paper-icon-button {
ha-icon-button {
width: var(--mmp-unit);
height: var(--mmp-unit);
color: var(--mmp-text-color, var(--primary-text-color));
transition: color .25s;
}
paper-icon-button[color] {
ha-icon-button[color] {
color: var(--mmp-accent-color, var(--accent-color)) !important;
opacity: 1 !important;
}
paper-icon-button[inactive] {
ha-icon-button[inactive] {
opacity: .5;
}

Expand Down