@@ -1997,22 +1997,43 @@ attribute_t *create_ac_capacity_format(cluster_t *cluster, uint8_t value)
1997
1997
namespace thermostat_user_interface_configuration {
1998
1998
namespace attribute {
1999
1999
2000
- attribute_t *create_temperature_display_mode (cluster_t *cluster, uint8_t value)
2000
+ attribute_t *create_temperature_display_mode (cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max )
2001
2001
{
2002
- return esp_matter::attribute::create (cluster, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id,
2003
- ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8 (value));
2002
+ attribute_t *attribute =
2003
+ esp_matter::attribute::create (cluster, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id,
2004
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8 (value));
2005
+ if (!attribute) {
2006
+ ESP_LOGE (TAG, " Could not create attribute" );
2007
+ return NULL ;
2008
+ }
2009
+ esp_matter::attribute::add_bounds (attribute, esp_matter_uint8 (min), esp_matter_uint8 (max));
2010
+ return attribute;
2004
2011
}
2005
2012
2006
- attribute_t *create_keypad_lockout (cluster_t *cluster, uint8_t value)
2013
+ attribute_t *create_keypad_lockout (cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max )
2007
2014
{
2008
- return esp_matter::attribute::create (cluster, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id,
2009
- ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8 (value));
2015
+ attribute_t *attribute =
2016
+ esp_matter::attribute::create (cluster, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id,
2017
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8 (value));
2018
+ if (!attribute) {
2019
+ ESP_LOGE (TAG, " Could not create attribute" );
2020
+ return NULL ;
2021
+ }
2022
+ esp_matter::attribute::add_bounds (attribute, esp_matter_uint8 (min), esp_matter_uint8 (max));
2023
+ return attribute;
2010
2024
}
2011
2025
2012
- attribute_t *create_schedule_programming_visibility (cluster_t *cluster, uint8_t value)
2026
+ attribute_t *create_schedule_programming_visibility (cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max )
2013
2027
{
2014
- return esp_matter::attribute::create (cluster, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id,
2015
- ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8 (value));
2028
+ attribute_t *attribute =
2029
+ esp_matter::attribute::create (cluster, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id,
2030
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_enum8 (value));
2031
+ if (!attribute) {
2032
+ ESP_LOGE (TAG, " Could not create attribute" );
2033
+ return NULL ;
2034
+ }
2035
+ esp_matter::attribute::add_bounds (attribute, esp_matter_uint8 (min), esp_matter_uint8 (max));
2036
+ return attribute;
2016
2037
}
2017
2038
2018
2039
} /* attribute */
0 commit comments