Fix peripheral volume_muted state (#403)

Enable updating the `volume_muted` status when muting/unmuting the media player volume, and improve its tracking.
This commit is contained in:
Omar Amin authored and GitHub committed 2026-08-17 20:23:16 +03:00
1 parent e334aa3fb1
commit 8303a96279
12 files changed
+177 -18

No files matched your search

@@ -361,7 +361,12 @@
volBar.style.width = pct + '%';
}
if (ev === 'volume_muted' && data) {
metaMuted.textContent = data.muted ? 'yes' : 'no';
const isMuted = !!data.muted;
metaMuted.textContent = isMuted ? 'yes' : 'no';
if (isMuted) {
metaVol.textContent = '0%';
volBar.style.width = '0%';
}
}
if (ev === 'zeroconf' && data) {
metaHa.textContent = data.status === 'connected' ? 'yes' : 'connecting…';