Skip to content

Commit

Permalink
properly tagging storage option based on zcl.json (#1140)
Browse files Browse the repository at this point in the history
* properly tagging storage option based on zcl.json
  • Loading branch information
paulr34 authored Sep 15, 2023
1 parent 142858f commit 34f287f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src-electron/db/query-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ async function insertOrUpdateAttributeState(
attributeId,
clusterRef
)
if (
staticAttribute.storagePolicy ==
dbEnum.storagePolicy.attributeAccessInterface
) {
staticAttribute.storagePolicy = dbEnum.storageOption.external
} else {
staticAttribute.storagePolicy = dbEnum.storageOption.ram
}

if (staticAttribute == null) {
throw new Error(`COULD NOT LOCATE ATTRIBUTE: ${attributeId} `)
Expand Down Expand Up @@ -245,7 +253,7 @@ INTO ENDPOINT_TYPE_ATTRIBUTE (
cluster.endpointTypeClusterId,
attributeId,
staticAttribute.defaultValue ? staticAttribute.defaultValue : '',
dbEnum.storageOption.ram,
staticAttribute.storagePolicy,
clusterRef,
reportMinInterval,
reportMaxInterval,
Expand Down
1 change: 1 addition & 0 deletions src-electron/zcl/zcl-loader-silabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ function prepareCluster(cluster, context, isExtension = false) {
if (context.listsUseAttributeAccessInterface && attribute.$.entryType) {
storagePolicy = dbEnum.storagePolicy.attributeAccessInterface
} else if (
context.listsUseAttributeAccessInterface &&
context.attributeAccessInterfaceAttributes &&
context.attributeAccessInterfaceAttributes[cluster.name] &&
context.attributeAccessInterfaceAttributes[cluster.name].includes(name)
Expand Down

0 comments on commit 34f287f

Please sign in to comment.