new ui 10
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user