diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 322c22cd54..07bf51e81d 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -925,6 +925,7 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) else { shutdownEndpoint(&(emAfEndpoints[index])); + emAfEndpoints[index].bitmask &= EMBER_AF_ENDPOINT_DISABLED; } EndpointId parentEndpointId = emberAfParentEndpointFromIndex(index); @@ -945,11 +946,6 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) app::Clusters::Descriptor::Attributes::PartsList::Id); } - if (!enable) - { - emAfEndpoints[index].bitmask &= EMBER_AF_ENDPOINT_DISABLED; - } - return true; }