@@ -183,7 +183,14 @@ async def all_type_attributes_for_cluster(self, cluster: ClusterObjects.Cluster,
183
183
184
184
async def check_attribute_read_for_type (self , attribute_type : type , return_objects : bool = False ) -> None :
185
185
# Get all clusters from device
186
+ self .fprint (f"self.device_clusters: { self .device_clusters } " , "red" , 2 )
186
187
for cluster in self .device_clusters :
188
+
189
+ # TEMPORARY: if cluster is SmokeCoAlarm skip, as it returns INVALID_ACTION when trying
190
+ # to subscribe to its TestInProgress attribute
191
+ # if cluster.id == 92:
192
+ # continue
193
+
187
194
all_types = await self .all_type_attributes_for_cluster (cluster , attribute_type )
188
195
self .fprint (f"all_types: { all_types } " , "green" , 2 )
189
196
@@ -231,9 +238,9 @@ async def test_TC_IDM_4_3(self):
231
238
await self .setup_class_helper (default_to_pase = False )
232
239
233
240
# all_clusters = [cluster for cluster in Clusters.ClusterObjects.ALL_ATTRIBUTES]
234
- # server_list_attr = Clusters.Objects. Descriptor.Attributes.ServerList
235
- # attribute_list = Clusters.Objects. Descriptor.Attributes.AttributeList
236
- # descriptor_obj = Clusters.Objects. Descriptor
241
+ # server_list_attr = Clusters.Descriptor.Attributes.ServerList
242
+ # attribute_list = Clusters.Descriptor.Attributes.AttributeList
243
+ # descriptor_obj = Clusters.Descriptor
237
244
# server_list_attr_path = [(0, server_list_attr)]
238
245
# descriptor_obj_path = [(0, descriptor_obj)]
239
246
# attribute_list_path = [0, attribute_list]
@@ -252,7 +259,7 @@ async def test_TC_IDM_4_3(self):
252
259
253
260
# Test setup
254
261
# Mandatory writable attributes
255
- node_label_attr = Clusters .Objects . BasicInformation .Attributes .NodeLabel
262
+ node_label_attr = Clusters .BasicInformation .Attributes .NodeLabel
256
263
257
264
# bc = Clusters.GeneralCommissioning.Attributes.Breadcrumb
258
265
# Event
@@ -363,7 +370,8 @@ async def test_TC_IDM_4_3(self):
363
370
nodeid = self .dut_node_id ,
364
371
attributes = node_label_attr_path ,
365
372
reportInterval = (self .min_interval_floor_sec , self .max_interval_ceiling_sec ),
366
- keepSubscriptions = False
373
+ keepSubscriptions = False ,
374
+ fabricFiltered = False
367
375
)
368
376
369
377
# Record time after subscription
@@ -375,7 +383,7 @@ async def test_TC_IDM_4_3(self):
375
383
# Records the time the first empty report after subscription arrives
376
384
sub_th_step1 .SetNotifySubscriptionStillActiveCallback (self .on_notify_subscription_still_active_empty_report )
377
385
378
- # Waint for empty report data
386
+ # Wait for empty report data
379
387
wait_increments = self .min_interval_floor_sec / 10
380
388
while not self .report_data_received :
381
389
time .sleep (wait_increments )
@@ -418,18 +426,24 @@ async def test_TC_IDM_4_3(self):
418
426
attr_path = [(self .root_node_endpoint , attribute )]
419
427
420
428
# Subscribe to attribute
429
+ self .fprint (f"Will sub TO: { attr_path } " , "black" , 7 )
430
+ logging .info (f"Attribute of type 'bool' was found" )
421
431
sub_th_step2 : SubscriptionTransaction = await TH .ReadAttribute (
422
432
nodeid = self .dut_node_id ,
423
433
attributes = attr_path ,
424
434
reportInterval = (self .min_interval_floor_sec , self .max_interval_ceiling_sec ),
425
- keepSubscriptions = False
435
+ keepSubscriptions = False ,
436
+ fabricFiltered = False
426
437
)
427
438
428
- self .fprint (f"sub_th_step2: { sub_th_step2 .subscriptionId } " , "yellow" , 3 )
439
+ # Verify the subscription was successfully activated and a priming
440
+ # data report was sent
441
+ asserts .assert_is_not_none (sub_th_step2 .subscriptionId , "Subscription activation to attribute of type 'bool' was unsuccessful" )
442
+ logging .info ("Subscription activation to attribute of type 'bool' successful" )
429
443
430
444
sub_th_step2 .Shutdown ()
431
445
else :
432
- logging .info ("No attribute of type bool was found, skipping step" )
446
+ logging .info ("No attribute of type ' bool' was found, skipping step" )
433
447
434
448
435
449
if __name__ == "__main__" :
0 commit comments