From 69abbea527faea79bb1bb5ce476c66349b02a560 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav Date: Tue, 3 Sep 2024 09:57:28 +0530 Subject: [PATCH 1/2] esp-matter/components: Fix bounds of SystemMode attribute of Thermostat Fixes https://github.com/espressif/esp-matter/issues/1067 --- components/esp_matter/esp_matter_cluster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index 04cc15393..6b1fa8f9b 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -1500,7 +1500,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_ global::attribute::create_cluster_revision(cluster, config->cluster_revision); attribute::create_local_temperature(cluster, config->local_temperature); attribute::create_control_sequence_of_operation(cluster, config->control_sequence_of_operation, 0x0, 0x5); - attribute::create_system_mode(cluster, config->system_mode, 0x0, 0x7); + attribute::create_system_mode(cluster, config->system_mode, 0x0, 0x9); } else { ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes."); } From 8ca654baf06bf5fcbd5b70910533c8727b8da9c1 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav Date: Wed, 4 Sep 2024 09:57:06 +0530 Subject: [PATCH 2/2] Fix CI --- .gitlab-ci.yml | 2 +- components/esp_matter/esp_matter_cluster.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10233483e..322467da9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,7 +65,6 @@ variables: # fetch submodules - export PYTHONPATH=${IDF_PATH}/tools/ci/python_packages/:${PYTHONPATH} - pip install python-gitlab - - pip install --upgrade idf-component-manager - python tools/ci/ci_fetch_submodule.py .setup_ot_br: &setup_ot_br @@ -140,6 +139,7 @@ variables: - *get_build_caches - *chip_submodule_update - *setup_idf + - pip install 'idf-component-manager~=1.4.0' - *setup_matter - cd ${ESP_MATTER_PATH} - mkdir -p ${REPOS_PATH} diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index 6b1fa8f9b..5cf2e8330 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -1499,8 +1499,8 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_ if (config) { global::attribute::create_cluster_revision(cluster, config->cluster_revision); attribute::create_local_temperature(cluster, config->local_temperature); - attribute::create_control_sequence_of_operation(cluster, config->control_sequence_of_operation, 0x0, 0x5); - attribute::create_system_mode(cluster, config->system_mode, 0x0, 0x9); + attribute::create_control_sequence_of_operation(cluster, config->control_sequence_of_operation, chip::to_underlying(Thermostat::ThermostatControlSequence::kCoolingOnly), chip::to_underlying(Thermostat::ThermostatControlSequence::kCoolingAndHeatingWithReheat)); + attribute::create_system_mode(cluster, config->system_mode, chip::to_underlying(Thermostat::ThermostatSystemMode::kOff), chip::to_underlying(Thermostat::ThermostatSystemMode::kSleep)); } else { ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes."); }