mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
components/esp-matter: Add mode select device type
This commit is contained in:
@@ -80,6 +80,17 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath &command_path, TLVRe
|
||||
} /* namespace app */
|
||||
} /* namespace chip */
|
||||
|
||||
static esp_err_t esp_matter_command_callback_change_to_mode(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr)
|
||||
{
|
||||
chip::app::Clusters::ModeSelect::Commands::ChangeToMode::DecodableType command_data;
|
||||
CHIP_ERROR error = Decode(tlv_data, command_data);
|
||||
if (error == CHIP_NO_ERROR) {
|
||||
emberAfModeSelectClusterChangeToModeCallback((CommandHandler *)opaque_ptr, command_path, command_data);
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
||||
static esp_err_t esp_matter_command_callback_key_set_write(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
|
||||
void *opaque_ptr)
|
||||
{
|
||||
@@ -2094,6 +2105,17 @@ command_t *create_go_to_tilt_percentage(cluster_t *cluster)
|
||||
} /* command */
|
||||
} /* window_covering */
|
||||
|
||||
namespace mode_select {
|
||||
namespace command {
|
||||
command_t *create_change_to_mode(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, ModeSelect::Commands::ChangeToMode::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_change_to_mode);
|
||||
}
|
||||
|
||||
} /* command */
|
||||
} /* mode_select */
|
||||
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user