diff --git a/src-electron/generator/matter/app/zap-templates/templates/app/helper.js b/src-electron/generator/matter/app/zap-templates/templates/app/helper.js index 2045908c51..c14e336f88 100644 --- a/src-electron/generator/matter/app/zap-templates/templates/app/helper.js +++ b/src-electron/generator/matter/app/zap-templates/templates/app/helper.js @@ -102,6 +102,16 @@ function chip_endpoint_generated_functions() { hasFunctionArray = true; } + if (configData.ClustersWithShutdownFunctions.includes(clusterName)) { + hasFunctionArray = true; + functionList = functionList.concat( + ` (EmberAfGenericClusterFunction) Matter${cHelper.asCamelCased( + clusterName, + false + )}ClusterServerShutdownCallback,\\\n` + ); + } + if (configData.ClustersWithPreAttributeChangeFunctions.includes(clusterName)) { functionList = functionList.concat( ` (EmberAfGenericClusterFunction) Matter${cHelper.asCamelCased( @@ -219,6 +229,11 @@ function chip_endpoint_cluster_list() { hasFunctionArray = true; } + if (configData.ClustersWithShutdownFunctions.includes(clusterName)) { + c.mask.push('SHUTDOWN_FUNCTION'); + hasFunctionArray = true; + } + if (configData.ClustersWithPreAttributeChangeFunctions.includes(clusterName)) { c.mask.push('PRE_ATTRIBUTE_CHANGED_FUNCTION'); hasFunctionArray = true;