diff --git a/src-electron/db/query-config.js b/src-electron/db/query-config.js index 743431c02d..802e2a6b3d 100644 --- a/src-electron/db/query-config.js +++ b/src-electron/db/query-config.js @@ -245,7 +245,7 @@ INTO ENDPOINT_TYPE_ATTRIBUTE ( cluster.endpointTypeClusterId, attributeId, staticAttribute.defaultValue ? staticAttribute.defaultValue : '', - dbEnum.storageOption.ram, + staticAttribute.storagePolicy, clusterRef, reportMinInterval, reportMaxInterval, diff --git a/src-electron/zcl/zcl-loader-silabs.js b/src-electron/zcl/zcl-loader-silabs.js index a9f2a591a9..d58c334986 100644 --- a/src-electron/zcl/zcl-loader-silabs.js +++ b/src-electron/zcl/zcl-loader-silabs.js @@ -556,15 +556,14 @@ function prepareCluster(cluster, context, isExtension = false) { attribute.$.reportingPolicy ) } - let storagePolicy = dbEnum.storagePolicy.any - if (context.listsUseAttributeAccessInterface && attribute.$.entryType) { - storagePolicy = dbEnum.storagePolicy.attributeAccessInterface - } else if ( + let storagePolicy = dbEnum.storageOption.ram + if ( + context.listsUseAttributeAccessInterface && context.attributeAccessInterfaceAttributes && context.attributeAccessInterfaceAttributes[cluster.name] && context.attributeAccessInterfaceAttributes[cluster.name].includes(name) ) { - storagePolicy = dbEnum.storagePolicy.attributeAccessInterface + storagePolicy = dbEnum.storageOption.external } let att = { code: parseInt(attribute.$.code),