@@ -266,7 +266,7 @@ async def verify_fan_control_attribute_values(self, endpoint, attr_to_update, or
266
266
speed_setting_current = speed_setting_read
267
267
speed_setting_previous = speed_setting_read
268
268
for value_to_write in iteration_range :
269
- # Clear the queue before each update to avoid attribute report duplicates
269
+ # Clear the attribute report queue before each update to avoid duplicates
270
270
self .attribute_subscription .get_last_report ()
271
271
272
272
# Write to attribute
@@ -277,16 +277,14 @@ async def verify_fan_control_attribute_values(self, endpoint, attr_to_update, or
277
277
# Verify that the current attribute value is greater than the previous
278
278
# one if order was set to Ascending, or less if order was set to Descending
279
279
if write_status == Status .Success :
280
- # Get current attribute value
280
+ # Get current attribute value and verify progression
281
281
queue = self .attribute_subscription .attribute_queue .queue
282
282
attr_value_current = await self .get_attribute_value_from_queue (queue , attr_to_verify , timeout_sec )
283
-
284
- # Verify attribute value progression
285
283
if attr_value_current is not None :
286
284
self .verify_attribute_progression (attr_to_verify , attr_value_current , attr_value_previous , order )
287
285
attr_value_previous = attr_value_current
288
286
289
- # Verify the same for the SpeedSetting attribute value (if supported)
287
+ # Get current SpeedSetting attribute value and verify progression (if supported)
290
288
if self .supports_speed :
291
289
speed_setting_current = await self .get_attribute_value_from_queue (queue , speed_setting_attr , timeout_sec )
292
290
if speed_setting_current is not None :
@@ -296,14 +294,12 @@ async def verify_fan_control_attribute_values(self, endpoint, attr_to_update, or
296
294
# If the write status is INVALID_IN_STATE, it means no write operation occurred
297
295
# Verify that the current attribute value is equal to the previous one
298
296
elif write_status == Status .InvalidInState :
299
- # Get current attribute value
297
+ # Get current attribute value and verify it's equal to the previous value
300
298
attr_value_current = await self .read_setting (endpoint , attr_to_verify )
301
-
302
- # Verify attribute value
303
299
asserts .assert_equal (attr_value_current , attr_value_previous ,
304
300
f"[FC] Current { attr_to_verify .__name__ } attribute value must be equal to the previous one" )
305
301
306
- # Verify the same for the SpeedSetting attribute value (if supported)
302
+ # Get current SpeedSetting attribute value and verify it's equal to the previous value (if supported)
307
303
if self .supports_speed :
308
304
speed_setting_current = await self .read_setting (endpoint , speed_setting_attr )
309
305
asserts .assert_equal (speed_setting_current , speed_setting_previous ,
0 commit comments