components/esp-matter: fix types for on_time and off_wait_time

These are non-nullable uint16's, so removed the nullable type
This commit is contained in:
Shubham Patil
2025-12-04 22:07:51 +05:30
parent 6bc6b83bb2
commit 0d89a620f2
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)); 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, return esp_matter::attribute::create(cluster, OnOff::Attributes::OnTime::Id,
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE, ATTRIBUTE_FLAG_WRITABLE,
esp_matter_nullable_uint16(value)); 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, return esp_matter::attribute::create(cluster, OnOff::Attributes::OffWaitTime::Id,
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE, ATTRIBUTE_FLAG_WRITABLE,
esp_matter_nullable_uint16(value)); esp_matter_uint16(value));
} }
attribute_t *create_start_up_on_off(cluster_t *cluster, nullable<uint8_t> 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 { namespace attribute {
attribute_t *create_on_off(cluster_t *cluster, bool value); attribute_t *create_on_off(cluster_t *cluster, bool value);
attribute_t *create_global_scene_control(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_on_time(cluster_t *cluster, uint16_t 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);
attribute_t *create_start_up_on_off(cluster_t *cluster, nullable<uint8_t> value); attribute_t *create_start_up_on_off(cluster_t *cluster, nullable<uint8_t> value);
} /* attribute */ } /* attribute */
} /* on_off */ } /* on_off */
+2 -2
View File
@@ -164,8 +164,8 @@ namespace lighting {
typedef struct config { typedef struct config {
bool global_scene_control; bool global_scene_control;
nullable<uint16_t> on_time; uint16_t on_time;
nullable<uint16_t> off_wait_time; uint16_t off_wait_time;
nullable<uint8_t> start_up_on_off; 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() : global_scene_control(1), on_time(0), off_wait_time(0), start_up_on_off(0) {}
} config_t; } config_t;