mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
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:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user