@@ -630,6 +630,25 @@ def remove_problem(location: typing.Union[CommandPathLocation, FeaturePathLocati
630
630
0x05 : XmlAttribute (name = 'SupportedTemperatureLevels' , datatype = 'list' , conformance = feature (0x02 , 'TL' ), read_access = view , write_access = none , write_optional = False ),
631
631
}
632
632
633
+ # TODO: Need automated parsing for atomic attributes.
634
+ atomic_request_cmd_id = 0xFE
635
+ atomic_response_cmd_id = 0xFD
636
+ atomic_request_name = "Atomic Request"
637
+ atomic_response_name = "Atomic Response"
638
+ presets_name = "Presets"
639
+ schedules_name = "Schedules"
640
+ if clusters [Clusters .Thermostat .id ].revision >= 8 :
641
+ presents_id = clusters [Clusters .Thermostat .id ].attribute_map [presets_name ]
642
+ schedules_id = clusters [Clusters .Thermostat .id ].attribute_map [schedules_name ]
643
+ conformance = or_operation ([conformance .attribute (presents_id , presets_name ),
644
+ conformance .attribute (schedules_id , schedules_name )])
645
+ clusters [Clusters .Thermostat .id ].accepted_commands [atomic_request_cmd_id ] = XmlCommand (
646
+ id = atomic_request_cmd_id , name = atomic_request_name , conformance = conformance )
647
+ clusters [Clusters .Thermostat .id ].generated_commands [atomic_response_cmd_id ] = XmlCommand (
648
+ id = atomic_response_cmd_id , name = atomic_response_name , conformance = conformance )
649
+ clusters [Clusters .Thermostat .id ].command_map [atomic_request_name ] = atomic_request_cmd_id
650
+ clusters [Clusters .Thermostat .id ].command_map [atomic_response_name ] = atomic_response_cmd_id
651
+
633
652
check_clusters_for_unknown_commands (clusters , problems )
634
653
635
654
return clusters , problems
0 commit comments