Skip to content

Commit 567b102

Browse files
committed
fix: Don't show volume value if zero or max
1 parent 3d359df commit 567b102

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/volume.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class Volume extends LitElement {
4242
class=${this.config.dynamicVolumeSlider && max === 100 ? 'over-threshold' : ''}
4343
></ha-control-slider>
4444
<div class="volume-level">
45-
<div style="flex: ${volume}">0%</div>
45+
<div style="flex: ${volume}">${volume > 0 ? '0%' : ''}</div>
4646
<div class="percentage">${volume}%</div>
47-
<div style="flex: ${max - volume};text-align: right">${max}%</div>
47+
<div style="flex: ${max - volume};text-align: right">${volume < max ? `${max}%` : ''}</div>
4848
</div>
4949
</div>
5050
<div class="percentage-slim" hide=${this.slim && nothing}>${volume}%</div>
@@ -133,7 +133,6 @@ class Volume extends LitElement {
133133
.percentage,
134134
.percentage-slim {
135135
font-weight: bold;
136-
font-size: 12px;
137136
align-self: center;
138137
}
139138

0 commit comments

Comments
 (0)