From 25665299d1647be0317b5fcf5af0c192d146e19c Mon Sep 17 00:00:00 2001 From: "Ethan.Z" Date: Wed, 9 Oct 2024 11:05:27 -0400 Subject: [PATCH] Update logic to process domain data - Added support to process domain data parsed from XML in both formats: General and - The plan to update ZAP XMLs using Alchemy will require this change, as domain definitions will be updated to the format --- src-electron/zcl/zcl-loader-silabs.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src-electron/zcl/zcl-loader-silabs.js b/src-electron/zcl/zcl-loader-silabs.js index dea764dbb0..cc054ab8c8 100644 --- a/src-electron/zcl/zcl-loader-silabs.js +++ b/src-electron/zcl/zcl-loader-silabs.js @@ -433,7 +433,13 @@ function prepareCluster(cluster, context, isExtension = false) { ret.name = cluster.name[0] ret.description = cluster.description ? cluster.description[0].trim() : '' ret.define = cluster.define[0] - ret.domain = cluster.domain[0] + // handle domain data parsed from both formats: + // General and + if (cluster.domain[0] && cluster.domain[0].$) { + ret.domain = cluster.domain[0].$.name + } else { + ret.domain = cluster.domain[0] + } ret.isSingleton = false if ('$' in cluster) { if (cluster.$.manufacturerCode == null) {