Skip to content

Commit

Permalink
feat: Allow for audio control points without an item key
Browse files Browse the repository at this point in the history
  • Loading branch information
ndorin committed Aug 28, 2024
1 parent 5a165a9 commit 61fb16f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ export const useGetAllDeviceStateFromRoomConfiguration = ({config}: {config: Roo

if(config.audioControlPointList) {
Object.values(config.audioControlPointList?.levelControls).forEach((lcl) => {
deviceKeys.push(lcl.parentDeviceKey + "--" + lcl.itemKey);
// if the level control has an item key, combine it with the parent device key
if(lcl.itemKey) {
deviceKeys.push(lcl.parentDeviceKey + "--" + lcl.itemKey);
} else {
deviceKeys.push(lcl.parentDeviceKey);
}
});
}

Expand Down

0 comments on commit 61fb16f

Please sign in to comment.