Skip to content

Commit

Permalink
Missing code added may be due to bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsalghelani-csa committed Oct 4, 2024
1 parent d0e3690 commit f82679c
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,25 @@ def remove_problem(location: typing.Union[CommandPathLocation, FeaturePathLocati
0x05: XmlAttribute(name='SupportedTemperatureLevels', datatype='list', conformance=feature(0x02, 'TL'), read_access=view, write_access=none, write_optional=False),
}

# TODO: Need automated parsing for atomic attributes.
atomic_request_cmd_id = 0xFE
atomic_response_cmd_id = 0xFD
atomic_request_name = "Atomic Request"
atomic_response_name = "Atomic Response"
presets_name = "Presets"
schedules_name = "Schedules"
if clusters[Clusters.Thermostat.id].revision >= 8:
presents_id = clusters[Clusters.Thermostat.id].attribute_map[presets_name]
schedules_id = clusters[Clusters.Thermostat.id].attribute_map[schedules_name]
conformance = or_operation([conformance_support.attribute(presents_id, presets_name),
conformance_support.attribute(schedules_id, schedules_name)])
clusters[Clusters.Thermostat.id].accepted_commands[atomic_request_cmd_id] = XmlCommand(
id=atomic_request_cmd_id, name=atomic_request_name, conformance=conformance)
clusters[Clusters.Thermostat.id].generated_commands[atomic_response_cmd_id] = XmlCommand(
id=atomic_response_cmd_id, name=atomic_response_name, conformance=conformance)
clusters[Clusters.Thermostat.id].command_map[atomic_request_name] = atomic_request_cmd_id
clusters[Clusters.Thermostat.id].command_map[atomic_response_name] = atomic_response_cmd_id

check_clusters_for_unknown_commands(clusters, problems)

return clusters, problems
Expand Down

0 comments on commit f82679c

Please sign in to comment.