From c5c997fc4f1e47c0f3f87f8d3c44f1f761759570 Mon Sep 17 00:00:00 2001 From: shripad621git Date: Tue, 7 Oct 2025 14:14:36 +0530 Subject: [PATCH] esp_matter/data_model: Add better error logging in case of attribute type mismatch in set_val - Fixes https://github.com/espressif/esp-matter/issues/1551. --- components/esp_matter/data_model/esp_matter_data_model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_matter/data_model/esp_matter_data_model.cpp b/components/esp_matter/data_model/esp_matter_data_model.cpp index daac8efbd..9e60e8bec 100644 --- a/components/esp_matter/data_model/esp_matter_data_model.cpp +++ b/components/esp_matter/data_model/esp_matter_data_model.cpp @@ -633,7 +633,7 @@ esp_err_t set_val(attribute_t *attribute, esp_matter_attr_val_t *val, bool call_ ESP_RETURN_ON_FALSE(!(current_attribute->flags & ATTRIBUTE_FLAG_MANAGED_INTERNALLY), ESP_ERR_NOT_SUPPORTED, TAG, "Attribute is not managed by esp matter data model"); VerifyOrReturnError(current_attribute->val.type == val->type, ESP_ERR_INVALID_ARG, - ESP_LOGE(TAG, "Different value type")); + ESP_LOGE(TAG, "Different value type : Expected Type : %u Attempted Type: %u", current_attribute->val.type, val->type)); if ((current_attribute->flags & ATTRIBUTE_FLAG_MIN_MAX) && current_attribute->bounds) { if (compare_attr_val_with_bounds(*val, *current_attribute->bounds) != 0) {