diff --git a/components/esp_matter/esp_matter_icd_configuration.cpp b/components/esp_matter/esp_matter_icd_configuration.cpp index df1ef0bdf..b26cfa597 100644 --- a/components/esp_matter/esp_matter_icd_configuration.cpp +++ b/components/esp_matter/esp_matter_icd_configuration.cpp @@ -110,14 +110,12 @@ static esp_err_t set_active_threshold(uint32_t active_threshold_ms) return chip::Test::ICDConfigurationDataTestAccess::SetActiveThreshold(Milliseconds32(active_threshold_ms)); } -#ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL -static bool s_enable_icd_server = true; +static bool s_enable_icd_server = CHIP_CONFIG_ENABLE_ICD_SERVER; bool get_icd_server_enabled() { return s_enable_icd_server; } -#endif // CONFIG_ESP_MATTER_ENABLE_DATA_MODEL esp_err_t set_configuration_data(config_t *config) { diff --git a/components/esp_matter/esp_matter_icd_configuration.h b/components/esp_matter/esp_matter_icd_configuration.h index a47191fda..550d713a6 100644 --- a/components/esp_matter/esp_matter_icd_configuration.h +++ b/components/esp_matter/esp_matter_icd_configuration.h @@ -29,11 +29,9 @@ typedef struct config { std::optional active_threshold_ms; } config_t; -#ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL /** Get whether ICD server is enabled for Matter end-device */ bool get_icd_server_enabled(); -#endif /** Set ICD configuration data *