components/esp-matter: conformance fixes for thermostat cluster

- moved cluster revision from 8 to 9
- thermostat cluster has schedule and preset attributes with quality T
  i.e. atomic. It requires the cluster to implement atomic-request and
  atomic-response command.
This commit is contained in:
Shubham Patil
2025-08-28 18:49:29 +05:30
parent a40259cd96
commit 16f51d2b9c
4 changed files with 32 additions and 1 deletions
@@ -1095,6 +1095,17 @@ static esp_err_t esp_matter_command_callback_set_active_schedule_request(const C
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_thermostat_atomic_request(const ConcreteCommandPath &command_path,
TLVReader &tlv_data, void *opaque_ptr)
{
chip::app::Clusters::Thermostat::Commands::AtomicRequest::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfThermostatClusterAtomicRequestCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_set_active_preset_request(const ConcreteCommandPath &command_path,
TLVReader &tlv_data, void *opaque_ptr)
{
@@ -2560,6 +2571,17 @@ command_t *create_set_active_preset_request(cluster_t *cluster)
esp_matter_command_callback_set_active_preset_request);
}
command_t *create_atomic_request(cluster_t *cluster)
{
return esp_matter::command::create(cluster, Thermostat::Commands::AtomicRequest::Id, COMMAND_FLAG_ACCEPTED,
esp_matter_command_callback_thermostat_atomic_request);
}
command_t *create_atomic_response(cluster_t *cluster)
{
return esp_matter::command::create(cluster, Thermostat::Commands::AtomicResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
} /* thermostat */