From 6e1bfabcd95bd05ee42b89bbc5188b9086e2286a Mon Sep 17 00:00:00 2001 From: Dhaval Gujar Date: Fri, 17 Oct 2025 21:34:19 +0530 Subject: [PATCH] components/esp_matter: mode_select missing entries The `cluster::mode_select::create()` API was missing an entry in function_list and function_flags. This caused a crash when ChangeToMode command was sent to the cluster. --- components/esp_matter/data_model/esp_matter_cluster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_matter/data_model/esp_matter_cluster.cpp b/components/esp_matter/data_model/esp_matter_cluster.cpp index 58b3a7265..11fe1c9b5 100644 --- a/components/esp_matter/data_model/esp_matter_cluster.cpp +++ b/components/esp_matter/data_model/esp_matter_cluster.cpp @@ -2606,8 +2606,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) namespace mode_select { const function_generic_t function_list[] = { (function_generic_t)emberAfModeSelectClusterServerInitCallback, + (function_generic_t)MatterModeSelectClusterServerPreAttributeChangedCallback, }; -const int function_flags = CLUSTER_FLAG_INIT_FUNCTION; +const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_PRE_ATTRIBUTE_CHANGED_FUNCTION; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) {