Merge branch 'fix-attribute-types-1-2' into 'release/v1.2'

[v1.2] components/esp-matter: fix types for on_time and off_wait_time

See merge request app-frameworks/esp-matter!1348
This commit is contained in:
Shu Chen
2025-12-19 01:51:23 +00:00
3 changed files with 10 additions and 10 deletions
@@ -1088,18 +1088,18 @@ attribute_t *create_global_scene_control(cluster_t *cluster, bool value)
esp_matter_bool(value));
}
attribute_t *create_on_time(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_on_time(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, OnOff::Attributes::OnTime::Id,
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE,
esp_matter_nullable_uint16(value));
ATTRIBUTE_FLAG_WRITABLE,
esp_matter_uint16(value));
}
attribute_t *create_off_wait_time(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_off_wait_time(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, OnOff::Attributes::OffWaitTime::Id,
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE,
esp_matter_nullable_uint16(value));
ATTRIBUTE_FLAG_WRITABLE,
esp_matter_uint16(value));
}
attribute_t *create_start_up_on_off(cluster_t *cluster, nullable<uint8_t> value)
+2 -2
View File
@@ -309,8 +309,8 @@ namespace on_off {
namespace attribute {
attribute_t *create_on_off(cluster_t *cluster, bool value);
attribute_t *create_global_scene_control(cluster_t *cluster, bool value);
attribute_t *create_on_time(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_off_wait_time(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_on_time(cluster_t *cluster, uint16_t value);
attribute_t *create_off_wait_time(cluster_t *cluster, uint16_t value);
attribute_t *create_start_up_on_off(cluster_t *cluster, nullable<uint8_t> value);
} /* attribute */
} /* on_off */
+2 -2
View File
@@ -164,8 +164,8 @@ namespace lighting {
typedef struct config {
bool global_scene_control;
nullable<uint16_t> on_time;
nullable<uint16_t> off_wait_time;
uint16_t on_time;
uint16_t off_wait_time;
nullable<uint8_t> start_up_on_off;
config() : global_scene_control(1), on_time(0), off_wait_time(0), start_up_on_off(0) {}
} config_t;