mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user