@@ -3647,7 +3647,7 @@ class DoorLockCluster(private val controller: MatterController, private val endp
3647
3647
}
3648
3648
}
3649
3649
3650
- suspend fun readAutoRelockTimeAttribute (): UInt {
3650
+ suspend fun readAutoRelockTimeAttribute (): UInt? {
3651
3651
val ATTRIBUTE_ID : UInt = 35u
3652
3652
3653
3653
val attributePath =
@@ -3673,7 +3673,12 @@ class DoorLockCluster(private val controller: MatterController, private val endp
3673
3673
3674
3674
// Decode the TLV data into the appropriate type
3675
3675
val tlvReader = TlvReader (attributeData.data)
3676
- val decodedValue: UInt = tlvReader.getUInt(AnonymousTag )
3676
+ val decodedValue: UInt? =
3677
+ if (tlvReader.isNextTag(AnonymousTag )) {
3678
+ tlvReader.getUInt(AnonymousTag )
3679
+ } else {
3680
+ null
3681
+ }
3677
3682
3678
3683
return decodedValue
3679
3684
}
@@ -3759,9 +3764,14 @@ class DoorLockCluster(private val controller: MatterController, private val endp
3759
3764
3760
3765
// Decode the TLV data into the appropriate type
3761
3766
val tlvReader = TlvReader (attributeData.data)
3762
- val decodedValue: UInt = tlvReader.getUInt(AnonymousTag )
3767
+ val decodedValue: UInt? =
3768
+ if (tlvReader.isNextTag(AnonymousTag )) {
3769
+ tlvReader.getUInt(AnonymousTag )
3770
+ } else {
3771
+ null
3772
+ }
3763
3773
3764
- emit(UIntSubscriptionState .Success (decodedValue))
3774
+ decodedValue?. let { emit(UIntSubscriptionState .Success (it)) }
3765
3775
}
3766
3776
SubscriptionState .SubscriptionEstablished -> {
3767
3777
emit(UIntSubscriptionState .SubscriptionEstablished )
0 commit comments