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 b5b01cbbe77edd..d6d10476811404 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 @@ -2851,7 +2851,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 e9d7612115a077..7fa6bae61d59dc 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 0a6d27521c8a74..27a458acdc6195 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 d538c8232f7bb0..43839293478d6d 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 48822ed58e83bf..eb235f5eaa24fa 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 48822ed58e83bf..eb235f5eaa24fa 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/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index ec61efd6ac2867..e523921bdaf9b3 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -2071,13 +2071,13 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint) // the StartUpColorTemperatureMireds attribute are listed in the table below. // Value Action on power up // 0x0000-0xffef Set the ColorTemperatureMireds attribute to this value. - // 0xffff Set the ColorTemperatureMireds attribute to its previous value. + // null Set the ColorTemperatureMireds attribute to its previous value. - // Initialize startUpColorTempMireds to "maintain previous value" value 0xFFFF - uint16_t startUpColorTemp = 0xFFFF; - EmberAfStatus status = Attributes::StartUpColorTemperatureMireds::Get(endpoint, &startUpColorTemp); + // Initialize startUpColorTempMireds to "maintain previous value" value null + app::DataModel::Nullable startUpColorTemp; + EmberAfStatus status = Attributes::StartUpColorTemperatureMireds::Get(endpoint, startUpColorTemp); - if (status == EMBER_ZCL_STATUS_SUCCESS) + if (status == EMBER_ZCL_STATUS_SUCCESS && !startUpColorTemp.IsNull()) { uint16_t updatedColorTemp = MAX_TEMPERATURE_VALUE; status = Attributes::ColorTemperature::Get(endpoint, &updatedColorTemp); @@ -2090,13 +2090,13 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint) uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE; Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &tempPhysicalMax); - if (tempPhysicalMin <= startUpColorTemp && startUpColorTemp <= tempPhysicalMax) + if (tempPhysicalMin <= startUpColorTemp.Value() && startUpColorTemp.Value() <= tempPhysicalMax) { // Apply valid startup color temp value that is within physical limits of device. // Otherwise, the startup value is outside the device's supported range, and the // existing setting of ColorTemp attribute will be left unchanged (i.e., treated as - // if startup color temp was set to 0xFFFF). - updatedColorTemp = startUpColorTemp; + // if startup color temp was set to null). + updatedColorTemp = startUpColorTemp.Value(); status = Attributes::ColorTemperature::Set(endpoint, updatedColorTemp); if (status == EMBER_ZCL_STATUS_SUCCESS) 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 ddb54a3525ae21..962b8b5f65b57b 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 336a61be05a3ff..260e8cd358f8e4 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 b13159384185e8..bfb97203032422 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -18134,7 +18134,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]), @@ -18193,7 +18193,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 @@ -19501,9 +19501,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 3bd3d70a8e3de3..064c07e07e814b 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 fcd359ef6e62ad..5ae514c770103a 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 2802b6e31b55c2..703b006f8a8353 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -57847,24 +57847,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 { @@ -57888,7 +57888,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); @@ -57910,7 +57915,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]) { @@ -57918,13 +57923,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]); }, @@ -57937,7 +57942,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; @@ -57946,7 +57951,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 397d0a242bfb45..af894f5f5786b7 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1149,7 +1149,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 9fa1281d38db4f..7146ee117b0947 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 @@ -19517,24 +19517,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; } @@ -19544,6 +19547,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 239360ac366b9a..6265e7ec77a943 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 @@ -3270,8 +3270,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 7aba9ed714c63e..02385347e8e705 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 @@ -19205,9 +19205,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; } @@ -19305,7 +19305,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 58cae4639d8ccf..e7f99834ec16d9 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 fc77b7c93e1fc8..e9db671e98d504 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -11414,8 +11414,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 f2031dd1c3b7d6..f50a45e43715b0 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -7866,7 +7866,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 63ba78c9d957e9..b8af2ffeeed896 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -3750,7 +3750,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)); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index fb2dc70021bd18..a20444b9b4f12c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -57787,7 +57787,7 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 7933636c51a006..72762e2525042a 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -6267,9 +6267,13 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("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 1361aff82ab860..4db663755aea03 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 765846c3745642..9f3438484cfb72 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 765846c3745642..9f3438484cfb72 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 */ \