components/esp_matter: Add irrigation system device type data model

This commit is contained in:
Mahesh Pimpale
2026-02-27 17:18:00 +05:30
committed by mahesh
parent bd5fb3a500
commit 96ab773bbc
4 changed files with 48 additions and 0 deletions
@@ -2300,6 +2300,30 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
return ESP_OK;
}
} /* soil_sensor */
namespace irrigation_system {
uint32_t get_device_type_id()
{
return ESP_MATTER_IRRIGATION_SYSTEM_DEVICE_TYPE_ID;
}
uint8_t get_device_type_version()
{
return ESP_MATTER_IRRIGATION_SYSTEM_DEVICE_TYPE_VERSION;
}
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data)
{
return common::create<config_t>(node, config, flags, priv_data, add);
}
esp_err_t add(endpoint_t *endpoint, config_t *config)
{
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
return ESP_OK;
}
} /* irrigation_system */
} /* endpoint */
namespace node {
@@ -169,6 +169,8 @@
#define ESP_MATTER_ELECTRICAL_METER_DEVICE_TYPE_VERSION 1
#define ESP_MATTER_SOIL_SENSOR_DEVICE_TYPE_ID 0x0045
#define ESP_MATTER_SOIL_SENSOR_DEVICE_TYPE_VERSION 1
#define ESP_MATTER_IRRIGATION_SYSTEM_DEVICE_TYPE_ID 0x0040
#define ESP_MATTER_IRRIGATION_SYSTEM_DEVICE_TYPE_VERSION 1
namespace esp_matter {
@@ -1194,6 +1196,17 @@ uint8_t get_device_type_version();
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
esp_err_t add(endpoint_t *endpoint, config_t *config);
} /* soil_sensor */
namespace irrigation_system {
typedef struct config {
cluster::descriptor::config_t descriptor;
} config_t;
uint32_t get_device_type_id();
uint8_t get_device_type_version();
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
esp_err_t add(endpoint_t *endpoint, config_t *config);
}
} /* endpoint */
namespace node {