diff --git a/components/esp_matter/esp_matter_endpoint.cpp b/components/esp_matter/esp_matter_endpoint.cpp index 3577ed2a1..589664241 100644 --- a/components/esp_matter/esp_matter_endpoint.cpp +++ b/components/esp_matter/esp_matter_endpoint.cpp @@ -2120,7 +2120,6 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) power_source_device::add(endpoint, &config->power_source_device); cluster_t *power_source_cluster = cluster::get(endpoint, PowerSource::Id); - power_source::feature::wired::add(power_source_cluster, &config->power_source_device.power_source.wired); power_source::feature::battery::add(power_source_cluster, &config->power_source_device.power_source.battery); power_source::attribute::create_bat_voltage(power_source_cluster, config->bat_voltage, 0x00, 0xFFFF); diff --git a/components/esp_matter/esp_matter_feature.cpp b/components/esp_matter/esp_matter_feature.cpp index d3774f3bb..16806f055 100644 --- a/components/esp_matter/esp_matter_feature.cpp +++ b/components/esp_matter/esp_matter_feature.cpp @@ -234,9 +234,9 @@ uint32_t get_id() esp_err_t add(cluster_t *cluster, config_t *config) { VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL")); - uint32_t battery_feature_map = feature::battery::get_id(); - if ((get_feature_map_value(cluster) & battery_feature_map) == battery_feature_map) { - ESP_LOGE(TAG, "Cluster already supports Battery feature"); + uint32_t wired_feature_map = feature::wired::get_id(); + if ((get_feature_map_value(cluster) & wired_feature_map) == wired_feature_map) { + ESP_LOGE(TAG, "Cluster already supports Wired feature"); return ESP_ERR_NOT_SUPPORTED; } update_feature_map(cluster, get_id()); @@ -259,9 +259,9 @@ uint32_t get_id() esp_err_t add(cluster_t *cluster, config_t *config) { VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL")); - uint32_t wired_feature_map = feature::wired::get_id(); - if ((get_feature_map_value(cluster) & wired_feature_map) == wired_feature_map) { - ESP_LOGE(TAG, "Cluster already supports Wired feature"); + uint32_t battery_feature_map = feature::battery::get_id(); + if ((get_feature_map_value(cluster) & battery_feature_map) == battery_feature_map) { + ESP_LOGE(TAG, "Cluster already supports Battery feature"); return ESP_ERR_NOT_SUPPORTED; } update_feature_map(cluster, get_id());