diff --git a/apps/ui/templates/device.html b/apps/ui/templates/device.html
index f6e88ea..be53790 100644
--- a/apps/ui/templates/device.html
+++ b/apps/ui/templates/device.html
@@ -339,8 +339,9 @@
}
}
- // Load device state
- deviceState = await window.apiClient.getDeviceState(deviceId);
+ // Load all device states at once
+ const allStates = await window.apiClient.getAllStates();
+ deviceState = allStates[deviceId] || {};
// Update header
document.getElementById('device-icon').textContent = deviceIcons[deviceData.type] || '📱';