diff --git a/pkg/service/soundtouchweb/static/js/app.js b/pkg/service/soundtouchweb/static/js/app.js index e0d4f9cc..2ec09881 100644 --- a/pkg/service/soundtouchweb/static/js/app.js +++ b/pkg/service/soundtouchweb/static/js/app.js @@ -246,7 +246,9 @@ function App() { async function refreshDevices() { const resp = await api.devices(); if (!resp?.success) throw new Error(resp?.error || 'Failed to refresh devices'); - setDevices(resp.data || {}); + // Ordered like the WebSocket frames: a slow REST snapshot must not + // clobber a newer status that arrived over the socket meanwhile. + setDevices(previous => mergeDevicesSnapshot(previous, resp.data)); } function mergeDeviceReadback(deviceId, status) {