File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -389,13 +389,30 @@ def handle_cluster_general_request(
389
389
hdr , args , dst_addressing = dst_addressing
390
390
)
391
391
392
- attr = args [0 ][0 ]
393
-
394
392
"""Pass-through reports of all attributes, except for system_mode."""
395
- if attr .attrid != SYSTEM_MODE_ATTR .id :
393
+ has_system_mode_report = False
394
+ for attr in args .attribute_reports :
395
+ if attr .attrid == SYSTEM_MODE_ATTR .id :
396
+ has_system_mode_report = True
397
+ break
398
+
399
+ if not has_system_mode_report :
396
400
return super ().handle_cluster_general_request (
397
401
hdr , args , dst_addressing = dst_addressing
398
402
)
403
+ else :
404
+ update_attributes = [
405
+ attr
406
+ for attr in args .attribute_reports
407
+ if attr .attrid != SYSTEM_MODE_ATTR .id
408
+ ]
409
+ if len (update_attributes ) > 0 :
410
+ msg = foundation .GENERAL_COMMANDS [
411
+ foundation .GeneralCommand .Report_Attributes
412
+ ].schema (attribute_reports = update_attributes )
413
+ return super ().handle_cluster_general_request (
414
+ hdr , msg , dst_addressing = dst_addressing
415
+ )
399
416
400
417
401
418
class BoschUserInterfaceCluster (CustomCluster , UserInterface ):
You can’t perform that action at this time.
0 commit comments