new ui 10

This commit is contained in:
2025-11-17 22:04:59 +01:00
parent cc25a22025
commit e140227f7a
4 changed files with 14 additions and 4 deletions

View File

@@ -246,7 +246,10 @@ class HomeAutomationClient {
const deviceMap = {};
devices.forEach(d => deviceMap[d.device_id] = d);
return room.devices
// Extract device IDs from room.devices (they are objects with device_id property)
const deviceIds = room.devices.map(d => d.device_id || d);
return deviceIds
.map(id => deviceMap[id])
.filter(d => d != null);
}

View File

@@ -8,7 +8,7 @@
/**
* @typedef {Object} Room
* @property {string} name - Room name (e.g., "Küche", "Wohnzimmer")
* @property {string[]} devices - Array of device IDs in this room
* @property {Array<{device_id: string, title: string, icon: string, rank: number}>} devices - Array of device objects in this room
*/
/**