Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HA standard wind speed sensor device default config value (TZ-1214) #451

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions components/esp-zigbee-lib/include/esp_zigbee_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,16 @@ typedef struct esp_zb_light_sensor_cfg_s {
esp_zb_illuminance_meas_cluster_cfg_t illuminance_cfg; /*!< Illuminance cluster configuration @ref esp_zb_illuminance_meas_cluster_cfg_s */
} esp_zb_light_sensor_cfg_t;

/**
* @brief Zigbee HA standard wind speed sensor clusters.
*
*/
typedef struct esp_zb_wind_speed_sensor_cfg_s {
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
esp_zb_wind_speed_measurement_cluster_cfg_t wind_speed_meas_cfg; /*!< Wind speed measurement cluster configuration, @ref esp_zb_wind_speed_measurement_cluster_cfg_s */
} esp_zb_wind_speed_sensor_cfg_t;

#ifdef __cplusplus
}
#endif
23 changes: 23 additions & 0 deletions components/esp-zigbee-lib/include/ha/esp_zigbee_ha_standard.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,29 @@ extern "C" {
}, \
}

lboue marked this conversation as resolved.
Show resolved Hide resolved
/**
* @brief Zigbee HA standard wind speed sensor device default config value.
*
*/
#define ESP_ZB_DEFAULT_WIND_SPEED_SENSOR_CONFIG() \
{ \
.basic_cfg = \
{ \
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
}, \
.identify_cfg = \
{ \
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
}, \
.wind_speed_meas_cfg = \
{ \
.measured_value = ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MEASURED_VALUE_DEFAULT, \
.min_value = ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT, \
.max_value = ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT, \
}, \
}

/**
* @brief Zigbee HA standard window covering device default config value.
*
Expand Down