diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index 54f96f30c02d2f..fd283fbe41e9b9 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -2850,7 +2850,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u colorTempPhysicalMinMireds = 16395;
readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
- attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
+ attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter
index 290f97cef9bea7..62185b243bd1a2 100644
--- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter
+++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter
@@ -1614,7 +1614,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u colorTempPhysicalMinMireds = 16395;
readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
- attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
+ attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter
index eb6f3d244f7c3f..606239367b542d 100644
--- a/examples/light-switch-app/light-switch-common/light-switch-app.matter
+++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter
@@ -1565,7 +1565,7 @@ client cluster ColorControl = 768 {
readonly attribute int16u colorTempPhysicalMinMireds = 16395;
readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
- attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
+ attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute int16u clusterRevision = 65533;
request struct MoveToHueRequest {
diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter
index cf7b3b4a67065c..08d29a50fcf79b 100644
--- a/examples/lighting-app/lighting-common/lighting-app.matter
+++ b/examples/lighting-app/lighting-common/lighting-app.matter
@@ -1511,7 +1511,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u colorTempPhysicalMinMireds = 16395;
readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
- attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
+ attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter
index 44aaab139aebaf..3c94652f6d9edd 100644
--- a/examples/placeholder/linux/apps/app1/config.matter
+++ b/examples/placeholder/linux/apps/app1/config.matter
@@ -1916,7 +1916,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u currentY = 4;
attribute bitmap8 options = 15;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
- attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
+ attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter
index 44aaab139aebaf..3c94652f6d9edd 100644
--- a/examples/placeholder/linux/apps/app2/config.matter
+++ b/examples/placeholder/linux/apps/app2/config.matter
@@ -1916,7 +1916,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u currentY = 4;
attribute bitmap8 options = 15;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
- attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
+ attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha.xml b/src/app/zap-templates/zcl/data-model/silabs/ha.xml
index f9ea448209d444..b40807c1b39211 100644
--- a/src/app/zap-templates/zcl/data-model/silabs/ha.xml
+++ b/src/app/zap-templates/zcl/data-model/silabs/ha.xml
@@ -243,7 +243,7 @@ limitations under the License.
CoupleColorTempToLevelMinMireds
-
+
StartUpColorTemperatureMireds
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 300cede056164e..cbe400f5453fcc 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -3178,7 +3178,7 @@ client cluster ColorControl = 768 {
readonly attribute int16u colorTempPhysicalMinMireds = 16395;
readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
- attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
+ attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index af6ff837ea7abb..fd7f6fcb174478 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -12925,10 +12925,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
return nullptr;
}
jobject value;
- std::string valueClassName = "java/lang/Integer";
- std::string valueCtorSignature = "(I)V";
- chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
- cppValue, value);
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ cppValue.Value(), value);
+ }
return value;
}
case Attributes::GeneratedCommandList::Id: {
diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
index 4612f4b7b96bae..e453c781ffd1f4 100644
--- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
+++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
@@ -4488,8 +4488,16 @@ JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribut
std::vector> cleanupByteArrays;
std::vector> cleanupStrings;
- cppValue =
- static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ if (value == nullptr)
+ {
+ cppValue.SetNull();
+ }
+ else
+ {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = static_cast>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ }
std::unique_ptr onSuccess(
Platform::New(callback), Platform::Delete);
diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp
index 68e371fabf727c..a9920f27d7b78a 100644
--- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp
+++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp
@@ -18957,6 +18957,73 @@ void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * co
env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
}
+CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback(
+ jobject javaCallback, bool keepAlive) :
+ chip::Callback::Callback(CallbackFn, this),
+ keepAlive(keepAlive)
+{
+ JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
+ if (env == nullptr)
+ {
+ ChipLogError(Zcl, "Could not create global reference for Java callback");
+ return;
+ }
+
+ javaCallbackRef = env->NewGlobalRef(javaCallback);
+ if (javaCallbackRef == nullptr)
+ {
+ ChipLogError(Zcl, "Could not create global reference for Java callback");
+ }
+}
+
+CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback()
+{
+ JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
+ if (env == nullptr)
+ {
+ ChipLogError(Zcl, "Could not delete global reference for Java callback");
+ return;
+ }
+ env->DeleteGlobalRef(javaCallbackRef);
+}
+
+void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn(
+ void * context, const chip::app::DataModel::Nullable & value)
+{
+ chip::DeviceLayer::StackUnlock unlock;
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread();
+ jobject javaCallbackRef;
+
+ VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env"));
+ std::unique_ptr cppCallback(
+ reinterpret_cast(context), maybeDestroy);
+
+ // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback.
+ javaCallbackRef = cppCallback.get()->javaCallbackRef;
+ VerifyOrReturn(javaCallbackRef != nullptr,
+ ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null"));
+
+ jmethodID javaMethod;
+ err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod);
+ VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method"));
+
+ jobject javaValue;
+ if (value.IsNull())
+ {
+ javaValue = nullptr;
+ }
+ else
+ {
+ std::string javaValueClassName = "java/lang/Integer";
+ std::string javaValueCtorSignature = "(I)V";
+ chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(),
+ value.Value(), javaValue);
+ }
+
+ env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue);
+}
+
CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGeneratedCommandListAttributeCallback(jobject javaCallback,
bool keepAlive) :
chip::Callback::Callback(CallbackFn, this),
diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h
index b1951ce5d661c3..6f80ffb6323ef8 100644
--- a/src/controller/java/zap-generated/CHIPReadCallbacks.h
+++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h
@@ -7912,6 +7912,36 @@ class CHIPColorControlColorPointBIntensityAttributeCallback
bool keepAlive;
};
+class CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback
+ : public chip::Callback::Callback
+{
+public:
+ CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback(jobject javaCallback, bool keepAlive = false);
+
+ ~CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback();
+
+ static void maybeDestroy(CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback * callback)
+ {
+ if (!callback->keepAlive)
+ {
+ callback->Cancel();
+ chip::Platform::Delete(callback);
+ }
+ }
+
+ static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value);
+ static void OnSubscriptionEstablished(void * context)
+ {
+ CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(
+ reinterpret_cast(context)->javaCallbackRef);
+ VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err)));
+ };
+
+private:
+ jobject javaCallbackRef;
+ bool keepAlive;
+};
+
class CHIPColorControlGeneratedCommandListAttributeCallback
: public chip::Callback::Callback
{
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
index 1aa9a1d2574557..bf07546f55e933 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
@@ -16188,6 +16188,14 @@ public interface ColorPointBIntensityAttributeCallback {
default void onSubscriptionEstablished() {}
}
+ public interface StartUpColorTemperatureMiredsAttributeCallback {
+ void onSuccess(@Nullable Integer value);
+
+ void onError(Exception ex);
+
+ default void onSubscriptionEstablished() {}
+ }
+
public interface GeneratedCommandListAttributeCallback {
void onSuccess(List valueList);
@@ -16784,7 +16792,8 @@ public void subscribeCoupleColorTempToLevelMinMiredsAttribute(
chipClusterPtr, callback, minInterval, maxInterval);
}
- public void readStartUpColorTemperatureMiredsAttribute(IntegerAttributeCallback callback) {
+ public void readStartUpColorTemperatureMiredsAttribute(
+ StartUpColorTemperatureMiredsAttributeCallback callback) {
readStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback);
}
@@ -16800,7 +16809,7 @@ public void writeStartUpColorTemperatureMiredsAttribute(
}
public void subscribeStartUpColorTemperatureMiredsAttribute(
- IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ StartUpColorTemperatureMiredsAttributeCallback callback, int minInterval, int maxInterval) {
subscribeStartUpColorTemperatureMiredsAttribute(
chipClusterPtr, callback, minInterval, maxInterval);
}
@@ -17262,7 +17271,7 @@ private native void subscribeCoupleColorTempToLevelMinMiredsAttribute(
long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
private native void readStartUpColorTemperatureMiredsAttribute(
- long chipClusterPtr, IntegerAttributeCallback callback);
+ long chipClusterPtr, StartUpColorTemperatureMiredsAttributeCallback callback);
private native void writeStartUpColorTemperatureMiredsAttribute(
long chipClusterPtr,
@@ -17271,7 +17280,10 @@ private native void writeStartUpColorTemperatureMiredsAttribute(
@Nullable Integer timedWriteTimeoutMs);
private native void subscribeStartUpColorTemperatureMiredsAttribute(
- long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
+ long chipClusterPtr,
+ StartUpColorTemperatureMiredsAttributeCallback callback,
+ int minInterval,
+ int maxInterval);
private native void readGeneratedCommandListAttribute(
long chipClusterPtr, GeneratedCommandListAttributeCallback callback);
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java
index b56a5d2d0e01ef..363098e815aa52 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java
@@ -8715,7 +8715,9 @@ public Map> getReadAttributeMap() {
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.readStartUpColorTemperatureMiredsAttribute(
- (ChipClusters.IntegerAttributeCallback) callback);
+ (ChipClusters.ColorControlCluster
+ .StartUpColorTemperatureMiredsAttributeCallback)
+ callback);
},
() -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
readColorControlStartUpColorTemperatureMiredsCommandParams);
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 71014e343e5285..a799f790238ef6 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -17875,7 +17875,7 @@ def descriptor(cls) -> ClusterObjectDescriptor:
ClusterObjectFieldDescriptor(Label="colorTempPhysicalMinMireds", Tag=0x0000400B, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="colorTempPhysicalMaxMireds", Tag=0x0000400C, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="coupleColorTempToLevelMinMireds", Tag=0x0000400D, Type=typing.Optional[uint]),
- ClusterObjectFieldDescriptor(Label="startUpColorTemperatureMireds", Tag=0x00004010, Type=typing.Optional[uint]),
+ ClusterObjectFieldDescriptor(Label="startUpColorTemperatureMireds", Tag=0x00004010, Type=typing.Union[None, Nullable, uint]),
ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
@@ -17934,7 +17934,7 @@ def descriptor(cls) -> ClusterObjectDescriptor:
colorTempPhysicalMinMireds: 'typing.Optional[uint]' = None
colorTempPhysicalMaxMireds: 'typing.Optional[uint]' = None
coupleColorTempToLevelMinMireds: 'typing.Optional[uint]' = None
- startUpColorTemperatureMireds: 'typing.Optional[uint]' = None
+ startUpColorTemperatureMireds: 'typing.Union[None, Nullable, uint]' = None
generatedCommandList: 'typing.List[uint]' = None
acceptedCommandList: 'typing.List[uint]' = None
attributeList: 'typing.List[uint]' = None
@@ -19242,9 +19242,9 @@ def attribute_id(cls) -> int:
@ChipUtility.classproperty
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
- return ClusterObjectFieldDescriptor(Type=typing.Optional[uint])
+ return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint])
- value: 'typing.Optional[uint]' = None
+ value: 'typing.Union[None, Nullable, uint]' = None
@dataclass
class GeneratedCommandList(ClusterAttributeDescriptor):
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 35da7e5702df95..ddf63b73389ed3 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -11155,8 +11155,12 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader &
if (*aError != CHIP_NO_ERROR) {
return nil;
}
- NSNumber * _Nonnull value;
- value = [NSNumber numberWithUnsignedShort:cppValue];
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedShort:cppValue.Value()];
+ }
return value;
}
case Attributes::GeneratedCommandList::Id: {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 5d6b998442bd78..6bf50c4dd083a9 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -13792,9 +13792,9 @@ NS_ASSUME_NONNULL_BEGIN
- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value,
NSError * _Nullable error))completionHandler;
-- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value
+- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value
completionHandler:(StatusCompletion)completionHandler;
-- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value
+- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value
params:(MTRWriteParams * _Nullable)params
completionHandler:(StatusCompletion)completionHandler;
/**
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 345e5d979f71ef..438b34df858237 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -57840,24 +57840,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su
- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value,
NSError * _Nullable error))completionHandler
{
- new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler,
+ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler,
^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) {
using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo;
- auto successFn = Callback::FromCancelable(success);
+ auto successFn = Callback::FromCancelable(success);
auto failureFn = Callback::FromCancelable(failure);
chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint);
return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall);
});
}
-- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value
+- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value
completionHandler:(StatusCompletion)completionHandler
{
- [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull) value
+ [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value
params:nil
completionHandler:completionHandler];
}
-- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value
+- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value
params:(MTRWriteParams * _Nullable)params
completionHandler:(StatusCompletion)completionHandler
{
@@ -57881,7 +57881,12 @@ new MTRDefaultSuccessCallbackBridge(
ListFreer listFreer;
using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo;
TypeInfo::Type cppValue;
- cppValue = value.unsignedShortValue;
+ if (value == nil) {
+ cppValue.SetNull();
+ } else {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = value.unsignedShortValue;
+ }
auto successFn = Callback::FromCancelable(success);
auto failureFn = Callback::FromCancelable(failure);
@@ -57903,7 +57908,7 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber
minInterval = [minInterval copy];
maxInterval = [maxInterval copy];
params = [params copy];
- new MTRInt16uAttributeCallbackSubscriptionBridge(
+ new MTRNullableInt16uAttributeCallbackSubscriptionBridge(
self.callbackQueue, self.device, reportHandler,
^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) {
if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) {
@@ -57911,13 +57916,13 @@ new MTRInt16uAttributeCallbackSubscriptionBridge(
return CHIP_ERROR_INVALID_ARGUMENT;
}
using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo;
- auto successFn = Callback::FromCancelable(success);
+ auto successFn = Callback::FromCancelable(success);
auto failureFn = Callback::FromCancelable(failure);
chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint);
return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall,
[minInterval unsignedShortValue], [maxInterval unsignedShortValue],
- MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
+ MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil,
params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue],
params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]);
},
@@ -57930,7 +57935,7 @@ + (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttribu
completionHandler:(void (^)(NSNumber * _Nullable value,
NSError * _Nullable error))completionHandler
{
- new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) {
+ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) {
if (attributeCacheContainer.cppAttributeCache) {
chip::app::ConcreteAttributePath path;
using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo;
@@ -57939,7 +57944,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su
path.mAttributeId = TypeInfo::GetAttributeId();
TypeInfo::DecodableType value;
CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value);
- auto successFn = Callback::FromCancelable(success);
+ auto successFn = Callback::FromCancelable(success);
if (err == CHIP_NO_ERROR) {
successFn->mCall(successFn->mContext, value);
}
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 594868ee4abf6c..16858bb0d7c77a 100644
--- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
+++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h
@@ -1148,7 +1148,8 @@
{ 0x0000400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ColorTempPhysicalMinMireds */ \
{ 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* ColorTempPhysicalMaxMireds */ \
{ 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \
- { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
+ { 0x00004010, ZAP_TYPE(INT16U), 2, \
+ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \
ZAP_MIN_MAX_DEFAULTS_INDEX(37) }, /* StartUpColorTemperatureMireds */ \
{ 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1F) }, /* FeatureMap */ \
{ 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
index 90354924895023..9b6a1320744068 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
@@ -19163,24 +19163,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value)
namespace StartUpColorTemperatureMireds {
-EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value)
+EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value)
{
using Traits = NumericAttributeTraits;
Traits::StorageType temp;
uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp));
VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
- if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ if (Traits::IsNullValue(temp))
{
- return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
}
- *value = Traits::StorageToWorking(temp);
return status;
}
EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value)
{
using Traits = NumericAttributeTraits;
- if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
{
return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
}
@@ -19190,6 +19193,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value)
return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
}
+EmberAfStatus SetNull(chip::EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
} // namespace StartUpColorTemperatureMireds
namespace FeatureMap {
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
index 6c4aceb301fc06..062fd33b19872f 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
@@ -3219,8 +3219,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value);
} // namespace CoupleColorTempToLevelMinMireds
namespace StartUpColorTemperatureMireds {
-EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u
+EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u
EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value);
+EmberAfStatus SetNull(chip::EndpointId endpoint);
+EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value);
} // namespace StartUpColorTemperatureMireds
namespace FeatureMap {
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
index e4adf34858c125..6854a4b6b8f353 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
@@ -18964,9 +18964,9 @@ struct TypeInfo
namespace StartUpColorTemperatureMireds {
struct TypeInfo
{
- using Type = uint16_t;
- using DecodableType = uint16_t;
- using DecodableArgType = uint16_t;
+ using Type = chip::app::DataModel::Nullable;
+ using DecodableType = chip::app::DataModel::Nullable;
+ using DecodableArgType = const chip::app::DataModel::Nullable &;
static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; }
static constexpr AttributeId GetAttributeId() { return Attributes::StartUpColorTemperatureMireds::Id; }
@@ -19064,7 +19064,7 @@ struct TypeInfo
Attributes::ColorTempPhysicalMaxMireds::TypeInfo::DecodableType colorTempPhysicalMaxMireds = static_cast(0);
Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableType coupleColorTempToLevelMinMireds =
static_cast(0);
- Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType startUpColorTemperatureMireds = static_cast(0);
+ Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType startUpColorTemperatureMireds;
Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList;
Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList;
Attributes::AttributeList::TypeInfo::DecodableType attributeList;
diff --git a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h
index 8f91e80ce4fdb7..0f51cdae6af6bb 100644
--- a/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h
+++ b/zzz_generated/chef-rootnode_extendedcolorlight_8lcaaYJVAa/zap-generated/endpoint_config.h
@@ -505,7 +505,8 @@
{ 0x0000400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ColorTempPhysicalMinMireds */ \
{ 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* ColorTempPhysicalMaxMireds */ \
{ 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CoupleColorTempToLevelMinMireds */ \
- { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
+ { 0x00004010, ZAP_TYPE(INT16U), 2, \
+ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \
ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* StartUpColorTemperatureMireds */ \
{ 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1f) }, /* FeatureMap */ \
{ 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index a460a482359f20..55ad468432b27c 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -11340,8 +11340,9 @@ void registerClusterColorControl(Commands & commands, CredentialIssuerCommands *
credsIssuerConfig), //
make_unique>>(
Id, "color-point-bintensity", 0, UINT8_MAX, Attributes::ColorPointBIntensity::Id, credsIssuerConfig), //
- make_unique>(Id, "start-up-color-temperature-mireds", 0, UINT16_MAX,
- Attributes::StartUpColorTemperatureMireds::Id, credsIssuerConfig), //
+ make_unique>>(
+ Id, "start-up-color-temperature-mireds", 0, UINT16_MAX, Attributes::StartUpColorTemperatureMireds::Id,
+ credsIssuerConfig), //
make_unique(Id, credsIssuerConfig), //
make_unique(Id, "current-hue", Attributes::CurrentHue::Id, credsIssuerConfig), //
make_unique(Id, "current-saturation", Attributes::CurrentSaturation::Id, credsIssuerConfig), //
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
index 71078e73a0a8d2..4f17a9b1c49ff4 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -7802,7 +7802,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP
return DataModelLogger::LogValue("CoupleColorTempToLevelMinMireds", 1, value);
}
case ColorControl::Attributes::StartUpColorTemperatureMireds::Id: {
- uint16_t value;
+ chip::app::DataModel::Nullable value;
ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
return DataModelLogger::LogValue("StartUpColorTemperatureMireds", 1, value);
}
diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h
index 28810d5a233c3e..0dd50853170353 100644
--- a/zzz_generated/chip-tool/zap-generated/test/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h
@@ -3222,7 +3222,7 @@ class Test_TC_CC_2_1Suite : public TestCommand
case 23:
VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0));
{
- uint16_t value;
+ chip::app::DataModel::Nullable value;
VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value)));
VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u"));
VerifyOrReturn(CheckConstraintMinValue("value", value, 0U));
@@ -79765,15 +79765,15 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand
chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value;
value.commissioningTimeout = 180U;
value.PAKEVerifier = mPakeVerifier.HasValue()
- ? mPakeVerifier.Value()
- : chip::ByteSpan(
+ ? mPakeVerifier.Value()
+ : chip::ByteSpan(
chip::Uint8::from_const_char(
"\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 "
"Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I "
"\320\225H\344\301\202@c\014O\364\221("startUpColorTemperatureMireds", [value unsignedShortValue], 0U));
- VerifyOrReturn(CheckConstraintMaxValue("startUpColorTemperatureMireds", [value unsignedShortValue], 65279U));
+ if (value != nil) {
+
+ VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "int16u", "int16u"));
+ VerifyOrReturn(CheckConstraintMinValue("startUpColorTemperatureMireds", [value unsignedShortValue], 0U));
+ VerifyOrReturn(
+ CheckConstraintMaxValue("startUpColorTemperatureMireds", [value unsignedShortValue], 65279U));
+ }
NextTest();
}];
diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h
index b954740b0e35ea..d12f1abae0467a 100644
--- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h
+++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h
@@ -532,7 +532,8 @@
{ 0x0000400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ColorTempPhysicalMinMireds */ \
{ 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* ColorTempPhysicalMaxMireds */ \
{ 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \
- { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
+ { 0x00004010, ZAP_TYPE(INT16U), 2, \
+ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \
ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* StartUpColorTemperatureMireds */ \
{ 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1F) }, /* FeatureMap */ \
{ 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \
diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h
index 22783ee9437ab9..a98f99b5e8dedb 100644
--- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h
+++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h
@@ -626,7 +626,8 @@
{ 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* CurrentY */ \
{ 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Options */ \
{ 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \
- { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
+ { 0x00004010, ZAP_TYPE(INT16U), 2, \
+ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \
ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* StartUpColorTemperatureMireds */ \
{ 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \
{ 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \
diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h
index 22783ee9437ab9..a98f99b5e8dedb 100644
--- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h
+++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h
@@ -626,7 +626,8 @@
{ 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* CurrentY */ \
{ 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Options */ \
{ 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \
- { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
+ { 0x00004010, ZAP_TYPE(INT16U), 2, \
+ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \
ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* StartUpColorTemperatureMireds */ \
{ 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \
{ 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \