Skip to content

Commit

Permalink
Ignore channel information for unknown channels in device tree (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio authored Sep 10, 2024
1 parent 1ddf3c3 commit 47fe97f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/knx-project-device-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ export class KNXProjectDeviceTree extends LitElement {
continue;
}
const comObject = validCOs[comObjectId];
if (!comObject.channel) {
noChannelComObjects.push(comObject);
if (comObject.channel && comObject.channel in channels) {
channels[comObject.channel].comObjects.push(comObject);
} else {
channels[comObject.channel].comObjects = (
channels[comObject.channel].comObjects || []
).concat([comObject]);
noChannelComObjects.push(comObject);
}
}
// filter unused channels
Expand Down

0 comments on commit 47fe97f

Please sign in to comment.