Fix illuminance measurement cluster attributes (#12614)
* Fix min boundary for max measured value
+ Use valid default values in all-clusters-app
* Regen all-clusters-app
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
index 00d2193..83a15fd 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
@@ -13029,7 +13029,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": "0x01",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13044,7 +13044,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": "0xFFFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
diff --git a/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml
index 0a215f6..9b63a13 100644
--- a/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml
@@ -28,7 +28,7 @@
<globalAttribute side="either" code="0xFFFD" value="2"/>
<attribute side="server" code="0x0000" define="ILLUM_MEASURED_VALUE" type="INT16U" min="0x0000" max="0xFFFF" writable="false" reportable="true" isNullable="true" default="0x0000" optional="false">MeasuredValue</attribute>
<attribute side="server" code="0x0001" define="ILLUM_MIN_MEASURED_VALUE" type="INT16U" min="0x0001" max="0xFFFD" writable="false" isNullable="true" optional="false">MinMeasuredValue</attribute>
- <attribute side="server" code="0x0002" define="ILLUM_MAX_MEASURED_VALUE" type="INT16U" min="0x0001" max="0xFFFE" writable="false" isNullable="true" optional="false">MaxMeasuredValue</attribute>
+ <attribute side="server" code="0x0002" define="ILLUM_MAX_MEASURED_VALUE" type="INT16U" min="0x0002" max="0xFFFE" writable="false" isNullable="true" optional="false">MaxMeasuredValue</attribute>
<attribute side="server" code="0x0003" define="ILLUM_TOLERANCE" type="INT16U" min="0x0000" max="0x0800" writable="false" optional="true" >Tolerance</attribute>
<attribute side="server" code="0x0004" define="ILLUM_LIGHT_SENSOR_TYPE" type="ENUM8" min="0x00" max="0xFF" writable="false" isNullable="true" default="0xFF" optional="true" >LightSensorType</attribute>
</cluster>
diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
index 4e0238a..d850a2e 100644
--- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
+++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
@@ -2003,8 +2003,8 @@
\
/* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \
{ 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \
- { 0x0001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \
- { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \
+ { 0x0001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* MinMeasuredValue */ \
+ { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0xFFFE) }, /* MaxMeasuredValue */ \
{ 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Tolerance */ \
{ 0x0004, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0xFF) }, /* LightSensorType */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \