mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
Merge branch 'add_bounds_of_thermostat_user_interface_configuration_cluster' into 'release/v1.3'
components/esp-matter:add bounds of thermostat user interface configuration cluster See merge request app-frameworks/esp-matter!961
This commit is contained in:
@@ -1997,22 +1997,43 @@ attribute_t *create_ac_capacity_format(cluster_t *cluster, uint8_t value)
|
||||
namespace thermostat_user_interface_configuration {
|
||||
namespace attribute {
|
||||
|
||||
attribute_t *create_temperature_display_mode(cluster_t *cluster, uint8_t value)
|
||||
attribute_t *create_temperature_display_mode(cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8(value));
|
||||
attribute_t *attribute =
|
||||
esp_matter::attribute::create(cluster, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8(value));
|
||||
if (!attribute) {
|
||||
ESP_LOGE(TAG, "Could not create attribute");
|
||||
return NULL;
|
||||
}
|
||||
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(min), esp_matter_uint8(max));
|
||||
return attribute;
|
||||
}
|
||||
|
||||
attribute_t *create_keypad_lockout(cluster_t *cluster, uint8_t value)
|
||||
attribute_t *create_keypad_lockout(cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8(value));
|
||||
attribute_t *attribute =
|
||||
esp_matter::attribute::create(cluster, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8(value));
|
||||
if (!attribute) {
|
||||
ESP_LOGE(TAG, "Could not create attribute");
|
||||
return NULL;
|
||||
}
|
||||
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(min), esp_matter_uint8(max));
|
||||
return attribute;
|
||||
}
|
||||
|
||||
attribute_t *create_schedule_programming_visibility(cluster_t *cluster, uint8_t value)
|
||||
attribute_t *create_schedule_programming_visibility(cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8(value));
|
||||
attribute_t *attribute =
|
||||
esp_matter::attribute::create(cluster, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8(value));
|
||||
if (!attribute) {
|
||||
ESP_LOGE(TAG, "Could not create attribute");
|
||||
return NULL;
|
||||
}
|
||||
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(min), esp_matter_uint8(max));
|
||||
return attribute;
|
||||
}
|
||||
|
||||
} /* attribute */
|
||||
|
||||
@@ -446,9 +446,9 @@ attribute_t *create_ac_capacity_format(cluster_t *cluster, uint8_t value);
|
||||
|
||||
namespace thermostat_user_interface_configuration {
|
||||
namespace attribute {
|
||||
attribute_t *create_temperature_display_mode(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_keypad_lockout(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_schedule_programming_visibility(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_temperature_display_mode(cluster_t *cluster, uint8_t value, uint8_t min = 0, uint8_t max = 1);
|
||||
attribute_t *create_keypad_lockout(cluster_t *cluster, uint8_t value, uint8_t min = 0, uint8_t max = 5);
|
||||
attribute_t *create_schedule_programming_visibility(cluster_t *cluster, uint8_t value, uint8_t min = 0, uint8_t max = 1);
|
||||
} /* attribute */
|
||||
} /* thermostat_user_interface_configuration */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user