diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 7031bdf08aa361..81e387f46efbe8 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -226,6 +226,11 @@ chip_python_wheel_action("chip-core") { "chip/storage/__init__.py", "chip/utils/CommissioningBuildingBlocks.py", "chip/utils/__init__.py", + "chip/yaml/__init__.py", + "chip/yaml/data_model_lookup.py", + "chip/yaml/errors.py", + "chip/yaml/format_converter.py", + "chip/yaml/parser.py", ] if (chip_controller) { @@ -269,6 +274,7 @@ chip_python_wheel_action("chip-core") { "chip.internal", "chip.interaction_model", "chip.logging", + "chip.yaml", "chip.native", "chip.clusters", "chip.setup_payload", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 69e82312c9aa1a..476925f68e71fb 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -85,6 +85,7 @@ class Identify(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0003 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -100,6 +101,7 @@ class TriggerEffect(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0003 command_id: typing.ClassVar[int] = 0x0040 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -259,6 +261,7 @@ class AddGroup(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'AddGroupResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -276,6 +279,7 @@ class AddGroupResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -293,6 +297,7 @@ class ViewGroup(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ViewGroupResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -308,6 +313,7 @@ class ViewGroupResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -327,6 +333,7 @@ class GetGroupMembership(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetGroupMembershipResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -342,6 +349,7 @@ class GetGroupMembershipResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -359,6 +367,7 @@ class RemoveGroup(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'RemoveGroupResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -374,6 +383,7 @@ class RemoveGroupResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -391,6 +401,7 @@ class RemoveAllGroups(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -404,6 +415,7 @@ class AddGroupIfIdentifying(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0004 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -585,6 +597,7 @@ class AddScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'AddSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -608,6 +621,7 @@ class AddSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -627,6 +641,7 @@ class ViewScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ViewSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -644,6 +659,7 @@ class ViewSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -669,6 +685,7 @@ class RemoveScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'RemoveSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -686,6 +703,7 @@ class RemoveSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -705,6 +723,7 @@ class RemoveAllScenes(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'RemoveAllScenesResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -720,6 +739,7 @@ class RemoveAllScenesResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -737,6 +757,7 @@ class StoreScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'StoreSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -754,6 +775,7 @@ class StoreSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -773,6 +795,7 @@ class RecallScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -792,6 +815,7 @@ class GetSceneMembership(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetSceneMembershipResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -807,6 +831,7 @@ class GetSceneMembershipResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -828,6 +853,7 @@ class EnhancedAddScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0040 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'EnhancedAddSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -851,6 +877,7 @@ class EnhancedAddSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0040 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -870,6 +897,7 @@ class EnhancedViewScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0041 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'EnhancedViewSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -887,6 +915,7 @@ class EnhancedViewSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0041 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -912,6 +941,7 @@ class CopyScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0042 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'CopySceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -935,6 +965,7 @@ class CopySceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0005 command_id: typing.ClassVar[int] = 0x0042 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1186,6 +1217,7 @@ class Off(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0006 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1199,6 +1231,7 @@ class On(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0006 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1212,6 +1245,7 @@ class Toggle(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0006 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1225,6 +1259,7 @@ class OffWithEffect(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0006 command_id: typing.ClassVar[int] = 0x0040 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1242,6 +1277,7 @@ class OnWithRecallGlobalScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0006 command_id: typing.ClassVar[int] = 0x0041 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1255,6 +1291,7 @@ class OnWithTimedOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0006 command_id: typing.ClassVar[int] = 0x0042 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1642,6 +1679,7 @@ class MoveToLevel(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1663,6 +1701,7 @@ class Move(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1684,6 +1723,7 @@ class Step(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1707,6 +1747,7 @@ class Stop(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1724,6 +1765,7 @@ class MoveToLevelWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1745,6 +1787,7 @@ class MoveWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1766,6 +1809,7 @@ class StepWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1789,6 +1833,7 @@ class StopWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1806,6 +1851,7 @@ class MoveToClosestFrequency(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0008 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3259,6 +3305,7 @@ class InstantAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3276,6 +3323,7 @@ class InstantActionWithTransition(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3295,6 +3343,7 @@ class StartAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3312,6 +3361,7 @@ class StartActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3331,6 +3381,7 @@ class StopAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3348,6 +3399,7 @@ class PauseAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3365,6 +3417,7 @@ class PauseActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3384,6 +3437,7 @@ class ResumeAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3401,6 +3455,7 @@ class EnableAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3418,6 +3473,7 @@ class EnableActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x0009 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3437,6 +3493,7 @@ class DisableAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x000A is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3454,6 +3511,7 @@ class DisableActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0025 command_id: typing.ClassVar[int] = 0x000B is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3733,6 +3791,7 @@ class MfgSpecificPing(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0028 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4267,6 +4326,7 @@ class QueryImage(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0029 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'QueryImageResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4296,6 +4356,7 @@ class QueryImageResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0029 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4325,6 +4386,7 @@ class ApplyUpdateRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0029 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ApplyUpdateResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4342,6 +4404,7 @@ class ApplyUpdateResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0029 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4359,6 +4422,7 @@ class NotifyUpdateApplied(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0029 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4533,6 +4597,7 @@ class AnnounceOtaProvider(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x002A command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6174,6 +6239,7 @@ class ArmFailSafe(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0030 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ArmFailSafeResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6191,6 +6257,7 @@ class ArmFailSafeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0030 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6208,6 +6275,7 @@ class SetRegulatoryConfig(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0030 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SetRegulatoryConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6227,6 +6295,7 @@ class SetRegulatoryConfigResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0030 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6244,6 +6313,7 @@ class CommissioningComplete(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0030 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'CommissioningCompleteResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6257,6 +6327,7 @@ class CommissioningCompleteResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0030 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6562,6 +6633,7 @@ class ScanNetworks(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ScanNetworksResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6579,6 +6651,7 @@ class ScanNetworksResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6600,6 +6673,7 @@ class AddOrUpdateWiFiNetwork(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6619,6 +6693,7 @@ class AddOrUpdateThreadNetwork(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6636,6 +6711,7 @@ class RemoveNetwork(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6653,6 +6729,7 @@ class NetworkConfigResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6672,6 +6749,7 @@ class ConnectNetwork(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ConnectNetworkResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6689,6 +6767,7 @@ class ConnectNetworkResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6708,6 +6787,7 @@ class ReorderNetwork(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0031 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6980,6 +7060,7 @@ class RetrieveLogsRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0032 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'RetrieveLogsResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6999,6 +7080,7 @@ class RetrieveLogsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0032 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7218,6 +7300,7 @@ class TestEventTrigger(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0033 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7599,6 +7682,7 @@ class ResetWatermarks(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0034 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8068,6 +8152,7 @@ class ResetCounts(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0035 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -9291,6 +9376,7 @@ class ResetCounts(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0036 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -9711,6 +9797,7 @@ class ResetCounts(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0037 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -10055,6 +10142,7 @@ class SetUtcTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0038 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11108,6 +11196,7 @@ class OpenCommissioningWindow(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003C command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11135,6 +11224,7 @@ class OpenBasicCommissioningWindow(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003C command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11154,6 +11244,7 @@ class RevokeCommissioning(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003C command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11390,6 +11481,7 @@ class AttestationRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'AttestationResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11405,6 +11497,7 @@ class AttestationResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11422,6 +11515,7 @@ class CertificateChainRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'CertificateChainResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11437,6 +11531,7 @@ class CertificateChainResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11452,6 +11547,7 @@ class CSRRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'CSRResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11469,6 +11565,7 @@ class CSRResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11486,6 +11583,7 @@ class AddNOC(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11509,6 +11607,7 @@ class UpdateNOC(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11526,6 +11625,7 @@ class NOCResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11545,6 +11645,7 @@ class UpdateFabricLabel(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x0009 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11560,6 +11661,7 @@ class RemoveFabric(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x000A is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11575,6 +11677,7 @@ class AddTrustedRootCertificate(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003E command_id: typing.ClassVar[int] = 0x000B is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11866,6 +11969,7 @@ class KeySetWrite(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003F command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11881,6 +11985,7 @@ class KeySetRead(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003F command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'KeySetReadResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11896,6 +12001,7 @@ class KeySetReadResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003F command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11911,6 +12017,7 @@ class KeySetRemove(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003F command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11926,6 +12033,7 @@ class KeySetReadAllIndices(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003F command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'KeySetReadAllIndicesResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11941,6 +12049,7 @@ class KeySetReadAllIndicesResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x003F command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12916,6 +13025,7 @@ class ChangeToMode(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0050 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13392,6 +13502,7 @@ class LockDoor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13411,6 +13522,7 @@ class UnlockDoor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13430,6 +13542,7 @@ class UnlockWithTimeout(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13451,6 +13564,7 @@ class SetWeekDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x000B is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13478,6 +13592,7 @@ class GetWeekDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x000C is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetWeekDayScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13495,6 +13610,7 @@ class GetWeekDayScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x000C is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13524,6 +13640,7 @@ class ClearWeekDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x000D is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13541,6 +13658,7 @@ class SetYearDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x000E is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13562,6 +13680,7 @@ class GetYearDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x000F is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetYearDayScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13579,6 +13698,7 @@ class GetYearDayScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x000F is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13602,6 +13722,7 @@ class ClearYearDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0010 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13619,6 +13740,7 @@ class SetHolidaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0011 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13640,6 +13762,7 @@ class GetHolidaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0012 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetHolidayScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13655,6 +13778,7 @@ class GetHolidayScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0012 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13678,6 +13802,7 @@ class ClearHolidaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0013 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13693,6 +13818,7 @@ class SetUser(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x001A is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13724,6 +13850,7 @@ class GetUser(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x001B is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetUserResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13739,6 +13866,7 @@ class GetUserResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x001C is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13772,6 +13900,7 @@ class ClearUser(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x001D is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13791,6 +13920,7 @@ class SetCredential(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0022 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SetCredentialResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13820,6 +13950,7 @@ class SetCredentialResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0023 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13839,6 +13970,7 @@ class GetCredentialStatus(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0024 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetCredentialStatusResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13854,6 +13986,7 @@ class GetCredentialStatusResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0025 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13877,6 +14010,7 @@ class ClearCredential(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0101 command_id: typing.ClassVar[int] = 0x0026 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14795,6 +14929,7 @@ class UpOrOpen(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0102 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14808,6 +14943,7 @@ class DownOrClose(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0102 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14821,6 +14957,7 @@ class StopMotion(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0102 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14834,6 +14971,7 @@ class GoToLiftValue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0102 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14849,6 +14987,7 @@ class GoToLiftPercentage(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0102 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14864,6 +15003,7 @@ class GoToTiltValue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0102 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14879,6 +15019,7 @@ class GoToTiltPercentage(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0102 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15374,6 +15515,7 @@ class BarrierControlGoToPercent(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0103 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15389,6 +15531,7 @@ class BarrierControlStop(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0103 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16639,6 +16782,7 @@ class SetpointRaiseLower(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0201 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16656,6 +16800,7 @@ class GetWeeklyScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0201 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16677,6 +16822,7 @@ class SetWeeklySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0201 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16698,6 +16844,7 @@ class GetWeeklySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0201 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetWeeklyScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16715,6 +16862,7 @@ class ClearWeeklySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0201 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18247,6 +18395,7 @@ class MoveToHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18270,6 +18419,7 @@ class MoveHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18291,6 +18441,7 @@ class StepHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18314,6 +18465,7 @@ class MoveToSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18335,6 +18487,7 @@ class MoveSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18356,6 +18509,7 @@ class StepSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18379,6 +18533,7 @@ class MoveToHueAndSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18402,6 +18557,7 @@ class MoveToColor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18425,6 +18581,7 @@ class MoveColor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18446,6 +18603,7 @@ class StepColor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0009 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18469,6 +18627,7 @@ class MoveToColorTemperature(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x000A is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18490,6 +18649,7 @@ class EnhancedMoveToHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0040 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18513,6 +18673,7 @@ class EnhancedMoveHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0041 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18534,6 +18695,7 @@ class EnhancedStepHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0042 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18557,6 +18719,7 @@ class EnhancedMoveToHueAndSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0043 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18580,6 +18743,7 @@ class ColorLoopSet(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0044 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18607,6 +18771,7 @@ class StopMoveStep(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x0047 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18624,6 +18789,7 @@ class MoveColorTemperature(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x004B is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18649,6 +18815,7 @@ class StepColorTemperature(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0300 command_id: typing.ClassVar[int] = 0x004C is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21484,6 +21651,7 @@ class ChangeChannel(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0504 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeChannelResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21499,6 +21667,7 @@ class ChangeChannelResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0504 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21516,6 +21685,7 @@ class ChangeChannelByNumber(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0504 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21533,6 +21703,7 @@ class SkipChannel(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0504 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21729,6 +21900,7 @@ class NavigateTarget(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0505 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NavigateTargetResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21746,6 +21918,7 @@ class NavigateTargetResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0505 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21947,6 +22120,7 @@ class Play(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21960,6 +22134,7 @@ class Pause(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21973,6 +22148,7 @@ class StopPlayback(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21986,6 +22162,7 @@ class StartOver(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21999,6 +22176,7 @@ class Previous(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22012,6 +22190,7 @@ class Next(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22025,6 +22204,7 @@ class Rewind(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22038,6 +22218,7 @@ class FastForward(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22051,6 +22232,7 @@ class SkipForward(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22066,6 +22248,7 @@ class SkipBackward(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x0009 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22081,6 +22264,7 @@ class PlaybackResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x000A is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22098,6 +22282,7 @@ class Seek(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x000B is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22371,6 +22556,7 @@ class SelectInput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0507 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22386,6 +22572,7 @@ class ShowInputStatus(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0507 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22399,6 +22586,7 @@ class HideInputStatus(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0507 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22412,6 +22600,7 @@ class RenameInput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0507 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22569,6 +22758,7 @@ class Sleep(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0508 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22784,6 +22974,7 @@ class SendKey(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0509 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SendKeyResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22799,6 +22990,7 @@ class SendKeyResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0509 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23043,6 +23235,7 @@ class LaunchContent(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050A command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LaunchResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23062,6 +23255,7 @@ class LaunchURL(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050A command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LaunchResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23081,6 +23275,7 @@ class LaunchResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050A command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23268,6 +23463,7 @@ class SelectOutput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050B command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23283,6 +23479,7 @@ class RenameOutput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050B command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23478,6 +23675,7 @@ class LaunchApp(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050C command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23495,6 +23693,7 @@ class StopApp(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050C command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23510,6 +23709,7 @@ class HideApp(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050C command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23525,6 +23725,7 @@ class LauncherResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050C command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23955,6 +24156,7 @@ class GetSetupPIN(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050E command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetSetupPINResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23974,6 +24176,7 @@ class GetSetupPINResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050E command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23989,6 +24192,7 @@ class Login(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050E command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24010,6 +24214,7 @@ class Logout(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x050E command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24391,6 +24596,7 @@ class GetProfileInfoResponseCommand(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0B04 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24412,6 +24618,7 @@ class GetProfileInfoCommand(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0B04 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24425,6 +24632,7 @@ class GetMeasurementProfileResponseCommand(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0B04 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24450,6 +24658,7 @@ class GetMeasurementProfileCommand(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0B04 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -26943,6 +27152,7 @@ class Test(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -26956,6 +27166,7 @@ class TestSpecificResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -26971,6 +27182,7 @@ class TestNotHandled(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -26984,6 +27196,7 @@ class TestAddArgumentsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -26999,6 +27212,7 @@ class TestSpecific(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestSpecificResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27012,6 +27226,7 @@ class TestSimpleArgumentResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0002 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27027,6 +27242,7 @@ class TestUnknownCommand(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27040,6 +27256,7 @@ class TestStructArrayArgumentResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0003 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27065,6 +27282,7 @@ class TestAddArguments(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestAddArgumentsResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27082,6 +27300,7 @@ class TestListInt8UReverseResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0004 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27097,6 +27316,7 @@ class TestSimpleArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestSimpleArgumentResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27112,6 +27332,7 @@ class TestEnumsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0005 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27129,6 +27350,7 @@ class TestStructArrayArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestStructArrayArgumentResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27154,6 +27376,7 @@ class TestNullableOptionalResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0006 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27175,6 +27398,7 @@ class TestStructArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27190,6 +27414,7 @@ class TestComplexNullableOptionalResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0007 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27259,6 +27484,7 @@ class TestNestedStructArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27274,6 +27500,7 @@ class BooleanResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0008 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27289,6 +27516,7 @@ class TestListStructArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0009 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27304,6 +27532,7 @@ class SimpleStructResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0009 is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27319,6 +27548,7 @@ class TestListInt8UArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000A is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27334,6 +27564,7 @@ class TestEmitTestEventResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000A is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27349,6 +27580,7 @@ class TestNestedStructListArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000B is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27364,6 +27596,7 @@ class TestEmitTestFabricScopedEventResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000B is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27379,6 +27612,7 @@ class TestListNestedStructListArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000C is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27394,6 +27628,7 @@ class TestListInt8UReverseRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000D is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestListInt8UReverseResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27409,6 +27644,7 @@ class TestEnumsRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000E is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestEnumsResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27426,6 +27662,7 @@ class TestNullableOptionalRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x000F is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestNullableOptionalResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27441,6 +27678,7 @@ class TestComplexNullableOptionalRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0010 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestComplexNullableOptionalResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27478,6 +27716,7 @@ class SimpleStructEchoRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0011 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SimpleStructResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27493,6 +27732,7 @@ class TimedInvokeRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0012 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27510,6 +27750,7 @@ class TestSimpleOptionalArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0013 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27525,6 +27766,7 @@ class TestEmitTestEventRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0014 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestEmitTestEventResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27544,6 +27786,7 @@ class TestEmitTestFabricScopedEventRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0015 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'TestEmitTestFabricScopedEventResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29040,6 +29283,7 @@ class FailAtFault(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC06 command_id: typing.ClassVar[int] = 0x0000 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29063,6 +29307,7 @@ class FailRandomlyAtFault(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC06 command_id: typing.ClassVar[int] = 0x0001 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: diff --git a/src/controller/python/chip/yaml/__init__.py b/src/controller/python/chip/yaml/__init__.py new file mode 100644 index 00000000000000..055bec97cafac4 --- /dev/null +++ b/src/controller/python/chip/yaml/__init__.py @@ -0,0 +1,23 @@ +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# @file +# Provides Python APIs for Matter. + +"""Provides yaml parser Python APIs for Matter.""" +from . import parser diff --git a/src/controller/python/chip/yaml/data_model_lookup.py b/src/controller/python/chip/yaml/data_model_lookup.py new file mode 100644 index 00000000000000..1e0c3ffe6f3f14 --- /dev/null +++ b/src/controller/python/chip/yaml/data_model_lookup.py @@ -0,0 +1,55 @@ +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from abc import ABC, abstractmethod +import chip.clusters as Clusters + + +class DataModelLookup(ABC): + @abstractmethod + def get_cluster(self, cluster: str): + pass + + @abstractmethod + def get_command(self, cluster: str, command: str): + pass + + @abstractmethod + def get_attribute(self, cluster: str, attribute: str): + pass + + +class PreDefinedDataModelLookup(DataModelLookup): + def get_cluster(self, cluster: str): + try: + return getattr(Clusters, cluster, None) + except AttributeError: + return None + + def get_command(self, cluster: str, command: str): + try: + commands = getattr(Clusters, cluster, None).Commands + return getattr(commands, command, None) + except AttributeError: + return None + + def get_attribute(self, cluster: str, attribute: str): + try: + attributes = getattr(Clusters, cluster, None).Attributes + return getattr(attributes, attribute, None) + except AttributeError: + return None diff --git a/src/controller/python/chip/yaml/errors.py b/src/controller/python/chip/yaml/errors.py new file mode 100644 index 00000000000000..e6c90123d1baad --- /dev/null +++ b/src/controller/python/chip/yaml/errors.py @@ -0,0 +1,30 @@ +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +class ParsingError(ValueError): + def __init__(self, message): + super().__init__(message) + + +class UnexpectedParsingError(ParsingError): + def __init__(self, message): + super().__init__(message) + + +class ValidationError(Exception): + def __init__(self, message): + super().__init__(message) diff --git a/src/controller/python/chip/yaml/format_converter.py b/src/controller/python/chip/yaml/format_converter.py new file mode 100644 index 00000000000000..11e38f8a9efb0a --- /dev/null +++ b/src/controller/python/chip/yaml/format_converter.py @@ -0,0 +1,126 @@ +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import typing +from chip.clusters.Types import Nullable, NullValue +from chip.tlv import uint, float32 +import enum +from chip.yaml.errors import ValidationError + + +_HEX_PREFIX = 'hex:' + + +def convert_name_value_pair_to_dict(arg_values): + ''' Fix yaml command arguments. + + For some reason, instead of treating the entire data payload of a + command as a singular struct, the top-level args are specified as 'name' + and 'value' pairs, while the payload of each argument is itself + correctly encapsulated. This fixes up this oddity to create a new + key/value pair with the key being the value of the 'name' field, and + the value being 'value' field. + ''' + ret_value = {} + + for item in arg_values: + ret_value[item['name']] = item['value'] + + return ret_value + + +def convert_yaml_type(field_value, field_type, use_from_dict=False): + ''' Converts yaml value to expected type. + + The YAML representation when converted to a Python dictionary does not + quite line up in terms of type (see each of the specific if branches + below for the rationale for the necessary fix-ups). This function does + a fix-up given a field value (as present in the YAML) and its matching + cluster object type and returns it. + ''' + origin = typing.get_origin(field_type) + + if field_value is None: + field_value = NullValue + + if (origin == typing.Union or origin == typing.Optional or origin == Nullable): + underlying_field_type = None + + if field_value is NullValue: + for t in typing.get_args(field_type): + if t == Nullable: + return field_value + + for t in typing.get_args(field_type): + # Comparison below explicitly not using 'isinstance' as that doesn't do what we want. + if t != Nullable and t != type(None): + underlying_field_type = t + break + + if (underlying_field_type is None): + raise ValueError(f"Can't find the underling type for {field_type}") + + field_type = underlying_field_type + + # Dictionary represents a data model struct. + if (type(field_value) is dict): + return_field_value = {} + field_descriptors = field_type.descriptor + for item in field_value: + try: + # We search for a matching item in the list of field descriptors + # for this struct and ensure we can find a field with a matching + # label. + field_descriptor = next( + x for x in field_descriptors.Fields if x.Label.lower() == + item.lower()) + except StopIteration as exc: + raise ValidationError( + f'Did not find field "{item}" in {str(field_type)}') from None + + return_field_value[field_descriptor.Label] = convert_yaml_type( + field_value[item], field_descriptor.Type, use_from_dict) + if use_from_dict: + return field_type.FromDict(return_field_value) + return return_field_value + elif(type(field_value) is float): + return float32(field_value) + # list represents a data model list + elif(type(field_value) is list): + list_element_type = typing.get_args(field_type)[0] + + # The field type passed in is the type of the list element and not list[T]. + for idx, item in enumerate(field_value): + field_value[idx] = convert_yaml_type(item, list_element_type, use_from_dict) + return field_value + # YAML conversion treats all numbers as ints. Convert to a uint type if the schema + # type indicates so. + elif (field_type == uint): + # Longer number are stored as strings. Need to make this conversion first. + value = int(field_value) + return field_type(value) + # YAML treats enums as ints. Convert to the typed enum class. + elif (issubclass(field_type, enum.Enum)): + return field_type(field_value) + # YAML treats bytes as strings. Convert to a byte string. + elif (field_type == bytes and type(field_value) != bytes): + if isinstance(field_value, str) and field_value.startswith(_HEX_PREFIX): + return bytes.fromhex(field_value[len(_HEX_PREFIX):]) + return str.encode(field_value) + # By default, just return the field_value casted to field_type. + else: + return field_type(field_value) diff --git a/src/controller/python/chip/yaml/parser.py b/src/controller/python/chip/yaml/parser.py new file mode 100644 index 00000000000000..67fc363ccf12a0 --- /dev/null +++ b/src/controller/python/chip/yaml/parser.py @@ -0,0 +1,371 @@ +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from abc import ABC, abstractmethod +from dataclasses import field +import typing +from chip import ChipDeviceCtrl +from chip.tlv import float32 +import yaml +import stringcase +import chip.interaction_model +import asyncio as asyncio +import logging +import math +from chip.yaml.errors import ParsingError, UnexpectedParsingError +from .data_model_lookup import * +import chip.yaml.format_converter as Converter + +_SUCCESS_STATUS_CODE = "SUCCESS" +logger = logging.getLogger('YamlParser') + + +class BaseAction(ABC): + '''Interface for a single yaml action that is to be executed.''' + + def __init__(self, label): + self._label = label + + @property + def label(self): + return self._label + + @abstractmethod + def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): + pass + + +class InvokeAction(BaseAction): + '''Single invoke action to be executed including validation of response.''' + + def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup): + '''Parse cluster invoke from yaml test configuration. + + Args: + 'item': Dictionary containing single invoke to be parsed. + 'cluster': Name of cluster which to invoke action is targeting. + 'data_model_lookup': Data model lookup to get attribute object. + Raises: + ParsingError: Raised if there is a benign error, and there is currently no + action to perform for this write attribute. + UnexpectedParsingError: Raised if there is an unexpected parsing error. + ''' + super().__init__(item['label']) + self._command_name = stringcase.pascalcase(item['command']) + self._cluster = cluster + self._request_object = None + self._expected_raw_response: dict = field(default_factory=dict) + self._expected_response_object = None + + command = data_model_lookup.get_command(self._cluster, self._command_name) + + if command is None: + raise ParsingError( + f'Failed to find cluster:{self._cluster} Command:{self._command_name}') + + command_object = command() + if (item.get('arguments')): + args = item['arguments']['values'] + + request_data_as_dict = Converter.convert_name_value_pair_to_dict(args) + + try: + request_data = Converter.convert_yaml_type( + request_data_as_dict, type(command_object)) + except ValueError: + raise ParsingError('Could not covert yaml type') + + # Create a cluster object for the request from the provided YAML data. + self._request_object = command_object.FromDict(request_data) + else: + self._request_object = command_object + + self._expected_raw_response = item.get('response') + + if (self._request_object.response_type is not None and + self._expected_raw_response is not None and + self._expected_raw_response.get('values')): + response_type = stringcase.pascalcase(self._request_object.response_type) + expected_command = data_model_lookup.get_command(self._cluster, response_type) + expected_response_args = self._expected_raw_response['values'] + expected_response_data_as_dict = Converter.convert_name_value_pair_to_dict( + expected_response_args) + expected_response_data = Converter.convert_yaml_type( + expected_response_data_as_dict, expected_command) + self._expected_response_object = expected_command.FromDict(expected_response_data) + + def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): + try: + resp = asyncio.run(dev_ctrl.SendCommand(node_id, endpoint, self._request_object)) + except chip.interaction_model.InteractionModelError: + if self._expected_raw_response is None: + raise + + expected_status_code = self._expected_raw_response.get('error') + if expected_status_code is not None and expected_status_code != _SUCCESS_STATUS_CODE: + logger.debug('Got error response, but was expected') + else: + raise + + if (self._expected_response_object is not None): + if (self._expected_response_object != resp): + logger.error(f'Expected response {self._expected_response_object} did not match ' + f'actual object {resp}') + + +class ReadAttributeAction(BaseAction): + '''Single read attribute action to be executed including validation.''' + + def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup): + '''Parse read attribute action from yaml test configuration. + + Args: + 'item': Dictionary contains single read attribute action to be parsed. + 'cluster': Name of cluster read attribute action is targeting. + 'data_model_lookup': Data model lookup to get attribute object. + Raises: + ParsingError: Raised if there is a benign error, and there is currently no + action to perform for this read attribute. + UnexpectedParsingError: Raised if there is an unexpected parsing error. + ''' + super().__init__(item['label']) + self._attribute_name = stringcase.pascalcase(item['attribute']) + self._cluster = cluster + self._cluster_object = None + self._request_object = None + self._expected_raw_response: dict = field(default_factory=dict) + self._expected_response_object: None = None + self._possibly_unsupported = False + + self._cluster_object = data_model_lookup.get_cluster(self._cluster) + if self._cluster_object is None: + raise UnexpectedParsingError( + f'ReadAttribute failed to find cluster object:{self._cluster}') + + self._request_object = data_model_lookup.get_attribute(self._cluster, self._attribute_name) + if self._request_object is None: + raise ParsingError( + f'ReadAttribute failed to find cluster:{self._cluster} ' + f'Attribute:{self._attribute_name}') + + if (item.get('arguments')): + raise UnexpectedParsingError( + f'ReadAttribute should not contain arguments. {self.label}') + + if self._request_object.attribute_type is None: + raise UnexpectedParsingError( + f'ReadAttribute doesnt have valid attribute_type. {self.label}') + + self._expected_raw_response = item.get('response') + if (self._expected_raw_response is None): + raise UnexpectedParsingError(f'ReadAttribute missing expected response. {self.label}') + + if 'optional' in item: + self._possibly_unsupported = True + + if 'value' in self._expected_raw_response: + self._expected_response_object = self._request_object.attribute_type.Type + expected_response_value = self._expected_raw_response['value'] + self._expected_response_data = Converter.convert_yaml_type( + expected_response_value, self._expected_response_object, use_from_dict=True) + + def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): + try: + resp = asyncio.run(dev_ctrl.ReadAttribute(node_id, [(self._request_object)])) + except chip.interaction_model.InteractionModelError: + if self._expected_raw_response is None: + raise + + expected_status_code = self._expected_raw_response.get('error') + if expected_status_code is not None and expected_status_code != _SUCCESS_STATUS_CODE: + logger.debug('Got error response, but was expected') + else: + raise + + if self._possibly_unsupported and not resp: + # We have found an unsupported attribute. Parsed test did specify that it might be + # unsupported, so nothing left to validate. + return + + # TODO: There is likely an issue here with Optional fields since None + if (self._expected_response_object is not None): + parsed_resp = resp[endpoint][self._cluster_object][self._request_object] + + if (self._expected_response_data != parsed_resp): + # TODO: It is debatable if this is the right thing to be doing here. This might + # need a follow up cleanup. + if (self._expected_response_object != float32 or + not math.isclose(self._expected_response_data, parsed_resp, rel_tol=1e-6)): + logger.error(f'Expected response {self._expected_response_data} didnt match ' + f'actual object {parsed_resp}') + + +class WriteAttributeAction(BaseAction): + '''Single write attribute action to be executed including validation.''' + + def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup): + '''Parse write attribute action from yaml test configuration. + + Args: + 'item': Dictionary contains single write attribute action to be parsed. + 'cluster': Name of cluster write attribute action is targeting. + 'data_model_lookup': Data model lookup to get attribute object. + Raises: + ParsingError: Raised if there is a benign error, and there is currently no + action to perform for this write attribute. + UnexpectedParsingError: Raised if there is an unexpected parsing error. + ''' + super().__init__(item['label']) + self._attribute_name = stringcase.pascalcase(item['attribute']) + self._cluster = cluster + self._request_object = None + + attribute = data_model_lookup.get_attribute(self._cluster, self._attribute_name) + if attribute is None: + raise ParsingError( + f'WriteAttribute failed to find cluster:{self._cluster} ' + f'Attribute:{self._attribute_name}') + + if (item.get('arguments')): + args = item['arguments']['value'] + try: + request_data = Converter.convert_yaml_type( + args, attribute.attribute_type.Type) + except ValueError: + raise ParsingError('Could not covert yaml type') + + # Create a cluster object for the request from the provided YAML data. + self._request_object = attribute(request_data) + else: + raise UnexpectedParsingError(f'WriteAttribute action does have arguments {self.label}') + + def run_action(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): + try: + resp = asyncio.run( + dev_ctrl.WriteAttribute(node_id, [(endpoint, self._request_object)])) + except chip.interaction_model.InteractionModelError: + if (self.expected_raw_response is not None and + self.expected_raw_response.get('error')): + logger.debug('Got error, but was expected') + else: + raise + + # TODO: confirm resp give a Success value, although not all write action are expected + # to succeed, hence why this is a todo and not simply just done. Below is example of + # what success check might look like. + # asserts.assert_equal(resp[0].Status, StatusEnum.Success, 'label write must succeed') + + +class YamlTestParser: + '''Parses the test YAMLs and converts to a more natural Pythonic representation. + + The parser also permits execution of those tests there-after. + ''' + + def __init__(self, yaml_path: str): + '''Constructor that parser the given a path to YAML test file.''' + with open(yaml_path, 'r') as stream: + try: + self._raw_data = yaml.safe_load(stream) + except yaml.YAMLError as exc: + raise exc + + self._name = self._raw_data['name'] + self._node_id = self._raw_data['config']['nodeId'] + self._cluster = self._raw_data['config'].get('cluster') + if self._cluster: + self._cluster = self._cluster.replace(' ', '') + self._endpoint = self._raw_data['config']['endpoint'] + self._base_action_test_list = [] + self._data_model_lookup = PreDefinedDataModelLookup() + + for item in self._raw_data['tests']: + # This currently behaves differently than the c++ version. We are evaluating if test + # is disabled before anything else, allowing for incorrectly named commands. + if item.get('disabled'): + logger.info(f"Test is disabled, skipping {item['label']}") + continue + + action = None + cluster = self._cluster + # Some of the tests contain 'cluster over-rides' that refer to a different + # cluster than that specified in 'config'. + if (item.get('cluster')): + cluster = item.get('cluster').replace(' ', '').replace('/', '') + if item['command'] == 'writeAttribute': + action = self._attribute_write_action_factory(item, cluster) + elif item['command'] == 'readAttribute': + action = self._attribute_read_action_factory(item, cluster) + else: + action = self._invoke_action_factory(item, cluster) + + if action is not None: + self._base_action_test_list.append(action) + else: + logger.warn(f"Failed to parse {item['label']}") + + def _invoke_action_factory(self, item: dict, cluster: str): + '''Parse cluster command from yaml test configuration. + + Args: + 'item': Dictionary contains single cluster action test to be parsed + 'cluster': Name of cluster action is targeting. + Returns: + InvokeAction if 'item' is a valid action to be executed. + None if 'item' was not parsed for a known reason that is not fatal. + ''' + try: + return InvokeAction(item, cluster, self._data_model_lookup) + except ParsingError: + return None + + def _attribute_read_action_factory(self, item: dict, cluster: str): + '''Parse read attribute action from yaml test configuration. + + Args: + 'item': Dictionary contains single read attribute action to be parsed. + 'cluster': Name of cluster read attribute action is targeting. + Returns: + ReadAttributeAction if 'item' is a valid action to be executed. + None if 'item' was not parsed for a known reason that is not fatal. + ''' + try: + return ReadAttributeAction(item, cluster, self._data_model_lookup) + except ParsingError: + return None + + def _attribute_write_action_factory(self, item: dict, cluster: str): + '''Parse write attribute action from yaml test configuration. + + Args: + 'item': Dictionary contains single write attribute action to be parsed. + 'cluster': Name of cluster write attribute action is targeting. + Returns: + WriteAttributeAction if 'item' is a valid action to be executed. + None if 'item' was not parsed for a known reason that is not fatal. + ''' + try: + return WriteAttributeAction(item, cluster, self._data_model_lookup) + except ParsingError: + return None + + def execute_tests(self, dev_ctrl: ChipDeviceCtrl): + '''Executes parsed YAML tests.''' + for idx, action in enumerate(self._base_action_test_list): + logger.info(f'test: {idx} -- Executing{action.label}') + + action.run_action(dev_ctrl, self._endpoint, self._node_id) diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 875a45982cd1c0..5695721c7100c6 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -90,6 +90,12 @@ class {{asUpperCamelCase name}}(Cluster): is_client: typing.ClassVar[bool] = True {{/if}} + {{~#if responseName}} + response_type: typing.ClassVar[str] = '{{asUpperCamelCase responseName}}' + {{else}} + response_type: typing.ClassVar[str] = None + {{/if}} + @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor(