From 99a7d8939620a61c07186b7b5be73076db38dbe2 Mon Sep 17 00:00:00 2001 From: liyashuai Date: Fri, 27 Jun 2025 10:38:49 +0800 Subject: [PATCH] [backport1.4][components] Add missing writeable flag for some attributes --- components/esp_matter/esp_matter_attribute.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/esp_matter/esp_matter_attribute.cpp b/components/esp_matter/esp_matter_attribute.cpp index 20cbcce77..27543f7df 100644 --- a/components/esp_matter/esp_matter_attribute.cpp +++ b/components/esp_matter/esp_matter_attribute.cpp @@ -2894,7 +2894,7 @@ attribute_t *create_spin_speed_current(cluster_t *cluster, nullable val attribute_t *create_number_of_rinses(cluster_t *cluster, uint8_t value) { - return esp_matter::attribute::create(cluster, LaundryWasherControls::Attributes::NumberOfRinses::Id, ATTRIBUTE_FLAG_NONE, + return esp_matter::attribute::create(cluster, LaundryWasherControls::Attributes::NumberOfRinses::Id, ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8(value)); } @@ -3641,8 +3641,8 @@ namespace boolean_state_configuration { namespace attribute { attribute_t *create_current_sensitivity_level(cluster_t *cluster, uint8_t value) { - return esp_matter::attribute::create(cluster, BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id, ATTRIBUTE_FLAG_NONVOLATILE, - esp_matter_uint8(value)); + return esp_matter::attribute::create(cluster, BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id, + ATTRIBUTE_FLAG_NONVOLATILE | ATTRIBUTE_FLAG_WRITABLE, esp_matter_uint8(value)); } attribute_t *create_supported_sensitivity_levels(cluster_t *cluster, const uint8_t value) @@ -4548,12 +4548,12 @@ attribute_t *create_maximum_discharge_current(cluster_t *cluster, int64_t value) attribute_t *create_user_maximum_charge_current(cluster_t *cluster, int64_t value) { - return esp_matter::attribute::create(cluster, EnergyEvse::Attributes::UserMaximumChargeCurrent::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_int64(value)); + return esp_matter::attribute::create(cluster, EnergyEvse::Attributes::UserMaximumChargeCurrent::Id, ATTRIBUTE_FLAG_NONVOLATILE | ATTRIBUTE_FLAG_WRITABLE, esp_matter_int64(value)); } attribute_t *create_randomization_delay_window(cluster_t *cluster, uint32_t value) { - return esp_matter::attribute::create(cluster, EnergyEvse::Attributes::RandomizationDelayWindow::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint32(value)); + return esp_matter::attribute::create(cluster, EnergyEvse::Attributes::RandomizationDelayWindow::Id, ATTRIBUTE_FLAG_NONVOLATILE | ATTRIBUTE_FLAG_WRITABLE, esp_matter_uint32(value)); } attribute_t *create_next_charge_start_time(cluster_t *cluster, nullable value) @@ -4578,7 +4578,7 @@ attribute_t *create_next_charge_target_soc(cluster_t *cluster, nullable attribute_t *create_approximate_ev_efficiency(cluster_t *cluster, nullable value) { - return esp_matter::attribute::create(cluster, EnergyEvse::Attributes::ApproximateEVEfficiency::Id, ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_nullable_uint16(value)); + return esp_matter::attribute::create(cluster, EnergyEvse::Attributes::ApproximateEVEfficiency::Id, ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_NONVOLATILE | ATTRIBUTE_FLAG_WRITABLE, esp_matter_nullable_uint16(value)); } attribute_t *create_state_of_charge(cluster_t *cluster, nullable value)