From a9edb9ae258eaefc301ba9fe585622a51e22499d Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Mon, 7 Nov 2022 17:35:50 +0000 Subject: [PATCH 01/10] Start of python YAML test parsers and executer Tested inside chip-repl with the following commands (with all-cluster app running on separate terminal already commissioned): import chip.yaml foo = chip.yaml.Yaml.YamlTestParser("src/app/tests/suites/TestCluster.yaml") foo.ExecuteTests(devCtrl) Co-authored-by: Jerry Johns --- src/controller/python/BUILD.gn | 4 + .../python/chip/clusters/Objects.py | 245 ++++++++++++ src/controller/python/chip/yaml/YamlParser.py | 351 ++++++++++++++++++ src/controller/python/chip/yaml/YamlUtils.py | 131 +++++++ src/controller/python/chip/yaml/__init__.py | 24 ++ .../templates/python-cluster-Objects-py.zapt | 6 + 6 files changed, 761 insertions(+) create mode 100644 src/controller/python/chip/yaml/YamlParser.py create mode 100644 src/controller/python/chip/yaml/YamlUtils.py create mode 100644 src/controller/python/chip/yaml/__init__.py diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 7031bdf08aa361..a58ac99038ed6e 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -226,6 +226,9 @@ chip_python_wheel_action("chip-core") { "chip/storage/__init__.py", "chip/utils/CommissioningBuildingBlocks.py", "chip/utils/__init__.py", + "chip/yaml/YamlParser.py", + "chip/yaml/YamlUtils.py", + "chip/yaml/__init__.py", ] if (chip_controller) { @@ -269,6 +272,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..376efeaf0f0ed4 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: str = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: diff --git a/src/controller/python/chip/yaml/YamlParser.py b/src/controller/python/chip/yaml/YamlParser.py new file mode 100644 index 00000000000000..3fa4c543202e29 --- /dev/null +++ b/src/controller/python/chip/yaml/YamlParser.py @@ -0,0 +1,351 @@ +# +# 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 dataclasses import field +import typing +from chip import ChipDeviceCtrl +from chip.tlv import float32 +import yaml +import stringcase +import chip.clusters as Clusters +import chip.interaction_model +import asyncio as asyncio +import logging +import math +import chip.yaml.YamlUtils as YamlUtils + + +logger = logging.getLogger('YamlParser') + + +class ParsingError(Exception): + def __init__(self, message): + super().__init__(message) + + +class SingleCommandInterface: + '''Interface for a single yaml command that is to be executed.''' + + def __init__(self): + pass + + def run_command(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): + pass + + +class ClusterCommand(SingleCommandInterface): + '''Single cluster command to be executed including validation of response.''' + + def __init__(self, label, request_type_name, cluster): + self.label: str = label + self.request_type_name: str = request_type_name + self.cluster: str = cluster + self.request_data: dict = field(default_factory=dict) + self.request_object: None = None + self.expected_response_data: dict = field(default_factory=dict) + self.expected_response_object: None = None + self.expected_raw_response: dict = field(default_factory=dict) + super().__init__() + + def run_command(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 not None and + self.expected_raw_response.get('error')): + 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} didnt match ' + f'actual object {resp}') + + +class ReadAttributeCommand(SingleCommandInterface): + '''Single read attribute command to be executed including validation.''' + + def __init__(self, label, request_type_name, cluster): + self.label: str = label + self.request_type_name: str = request_type_name + self.cluster: str = cluster + self.request_object: None = None + self.expected_response_data: dict = field(default_factory=dict) + self.expected_response_object: None = None + self.expected_raw_response: dict = field(default_factory=dict) + self.possibly_unsupported: bool = False + super().__init__() + + def run_command(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 not None and + self.expected_raw_response.get('error')): + logger.debug('Got error, but was expected') + else: + raise + + if self.possibly_unsupported and not resp: + # We have found an unsupported attribute and test case did specify + # that it might be unsupports, 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): + cluster_object_key = eval(f'Clusters.Objects.{self.cluster}') + cluster_value_key = eval( + f'Clusters.Objects.{self.cluster}.Attributes.{self.request_type_name}') + parsed_resp = resp[endpoint][cluster_object_key][cluster_value_key] + + 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 WriteAttributeCommand(SingleCommandInterface): + '''Single write attribute command to be executed including validation.''' + + def __init__(self, label, request_type_name, cluster): + self.label: str = label + self.request_type_name: str = request_type_name + self.cluster: str = cluster + self.request_data: dict = field(default_factory=dict) + self.request_object: None = None + super().__init__() + + def run_command(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 commands 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') + + +def ClusterCommandFactory(item: dict, cluster: str): + '''Parse cluster command from yaml test configuration. + + Args: + 'item': Dictionary contains single cluster command test to be parsed + 'cluster': Name of cluster command is targeting. + Returns: + ReadAttributeCommand if 'item' is a valid command to be executed. + None if 'item' was not parsed to a command to be executed for a known reason + that is none fatal. + Raises: + ParsingError: Raised if there is an unexpected parsing error. + ''' + test = ClusterCommand(item['label'], stringcase.pascalcase(item['command']), cluster) + + try: + test.request_object = eval(f'Clusters.{test.cluster}.Commands.{test.request_type_name}')() + except AttributeError: + pass + + if test.request_object is None: + return None + + if (item.get('arguments')): + args = item['arguments']['values'] + + test.request_data = YamlUtils.fixup_yaml_arguments(args) + + try: + test.request_data = YamlUtils.fixup_yaml_types( + test.request_data, type(test.request_object)) + except ValueError: + return None + + # Create a cluster object for the request from the provided YAML data. + test.request_object = test.request_object.FromDict(test.request_data) + + test.expected_raw_response = item.get('response') + if (test.request_object.response_type is not None and + test.expected_raw_response is not None and + test.expected_raw_response.get('values')): + response_type = stringcase.pascalcase(test.request_object.response_type) + expected_command = f'Clusters.{test.cluster}.Commands.{response_type}' + test.expected_response_object = eval(expected_command) + test.expected_response_data = test.expected_raw_response['values'] + test.expected_response_data = YamlUtils.fixup_yaml_arguments(test.expected_response_data) + + test.expected_response_data = YamlUtils.fixup_yaml_types( + test.expected_response_data, test.expected_response_object) + test.expected_response_object = test.expected_response_object.FromDict( + test.expected_response_data) + + return test + + +def AttributeReadCommandFactory(item: dict, cluster: str): + '''Parse read attribute command from yaml test configuration. + + Args: + 'item': Dictionary contains single read attribute test to be parsed + 'cluster': Name of cluster read attribute command is targeting. + Returns: + ReadAttributeCommand if 'item' is a valid command to be executed. + None if 'item' was not parsed to a command to be executed for a known reason + that is none fatal. + Raises: + ParsingError: Raised if there is an unexpected parsing error. + ''' + test = ReadAttributeCommand(item['label'], stringcase.pascalcase(item['attribute']), cluster) + + try: + test.request_object = eval(f'Clusters.{test.cluster}.Attributes.{test.request_type_name}') + except AttributeError: + pass + + if test.request_object is None: + raise ParsingError( + f'ReadAttribute failed to find cluster:{test.cluster} ' + f'Attribute:{test.request_type_name}') + + if (item.get('arguments')): + raise ParsingError(f'ReadAttribute should not contain arguments. {test.label}') + + if test.request_object.attribute_type is None: + raise ParsingError(f'ReadAttribute doesnt have valid attribute_type. {test.label}') + + test.expected_raw_response = item.get('response') + if (test.expected_raw_response is None): + raise ParsingError(f'ReadAttribute missing expected response. {test.label}') + + if 'optional' in item: + test.possibly_unsupported = True + + if 'value' in test.expected_raw_response: + test.expected_response_object = test.request_object.attribute_type.Type + value = test.expected_raw_response['value'] + test.expected_response_data = YamlUtils.fixup_yaml_types( + value, test.expected_response_object, use_from_dict=True) + + return test + + +def AttributeWriteCommandFactory(item: dict, cluster: str): + '''Parse write attribute command from yaml test configuration. + + Args: + 'item': Dictionary contains single write attribute test to be parsed + 'cluster': Name of cluster write attribute command is targeting. + Returns: + WriteAttributeCommand if 'item' is a valid command to be executed. + None if 'item' was not parsed to a command to be executed for a known reason + that is none fatal. + Raises: + ParsingError: Raised if there is an unexpected parsing error. + ''' + test = WriteAttributeCommand(item['label'], stringcase.pascalcase(item['attribute']), cluster) + + try: + test.request_object = eval(f'Clusters.{test.cluster}.Attributes.{test.request_type_name}') + except AttributeError: + pass + + if test.request_object is None: + raise ParsingError( + f'WriteAttribute failed to find cluster:{test.cluster} ' + f'Attribute:{test.request_type_name}') + + if (item.get('arguments')): + args = item['arguments']['value'] + try: + test.request_data = YamlUtils.fixup_yaml_types( + args, test.request_object.attribute_type.Type) + except ValueError: + return None + + # Create a cluster object for the request from the provided YAML data. + test.request_object = test.request_object(test.request_data) + else: + raise ParsingError(f'WriteAttribute command does have arguments {test.label}') + + return test + + +class YamlTestParser: + '''Parses the test YAMLs and converts to a more natural Pythonic representation. + + The parser also permits execution of those tests there-after. + ''' + _name: str + _node_id: int + _cluster: str + _endpoint: int + _base_command_test_list: typing.List[SingleCommandInterface] + _raw_data: dict + + 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']['cluster'].replace(' ', '') + self._endpoint = self._raw_data['config']['endpoint'] + self._base_command_test_list = [] + + for item in self._raw_data['tests']: + # We only support parsing invoke interactions. As support for write/reads get added, + # these skips will be removed. + test = 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.get('disabled'): + logger.info(f"Test is disabled, skipping {item['label']}") + continue + if item['command'] == 'writeAttribute': + test = AttributeWriteCommandFactory(item, cluster) + elif item['command'] == 'readAttribute': + test = AttributeReadCommandFactory(item, cluster) + else: + test = ClusterCommandFactory(item, cluster) + + if test is not None: + self._base_command_test_list.append(test) + else: + logger.warn(f"Failed to parse {item['label']}") + + def execute_tests(self, dev_ctrl: ChipDeviceCtrl): + '''Executes parsed YAML tests.''' + for idx, test in enumerate(self._base_command_test_list): + logger.info(f'Test: {idx} -- Executing{test.label}') + + test.run_command(dev_ctrl, self._endpoint, self._node_id) diff --git a/src/controller/python/chip/yaml/YamlUtils.py b/src/controller/python/chip/yaml/YamlUtils.py new file mode 100644 index 00000000000000..de4325e8560aae --- /dev/null +++ b/src/controller/python/chip/yaml/YamlUtils.py @@ -0,0 +1,131 @@ +# +# 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 +import stringcase + + +HEX_PREFIX = 'hex:' + + +class ValidationError(Exception): + def __init__(self, message): + super().__init__(message) + + +def fixup_yaml_arguments(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 fixup_yaml_types(field_value, field_type, use_from_dict=False): + ''' Converts yaml value to expected python 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] = fixup_yaml_types( + 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] = fixup_yaml_types(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/__init__.py b/src/controller/python/chip/yaml/__init__.py new file mode 100644 index 00000000000000..da8aad82f35c67 --- /dev/null +++ b/src/controller/python/chip/yaml/__init__.py @@ -0,0 +1,24 @@ +# +# 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 CHIP. +# + +"""Provides yaml parser Python APIs for CHIP.""" +from . import YamlParser diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 875a45982cd1c0..7da379de6885a0 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: str = '{{asUpperCamelCase responseName}}' + {{else}} + response_type: str = None + {{/if}} + @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( From cc781d2fe11787f0277ce43e2da9c9e9f8772f41 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Mon, 7 Nov 2022 21:59:14 +0000 Subject: [PATCH 02/10] Address PR comments --- src/controller/python/BUILD.gn | 1 + .../python/chip/yaml/DataModelLookup.py | 55 ++ src/controller/python/chip/yaml/YamlParser.py | 474 +++++++++--------- src/controller/python/chip/yaml/YamlUtils.py | 8 +- 4 files changed, 307 insertions(+), 231 deletions(-) create mode 100644 src/controller/python/chip/yaml/DataModelLookup.py diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index a58ac99038ed6e..6df6d39a92fff6 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -226,6 +226,7 @@ chip_python_wheel_action("chip-core") { "chip/storage/__init__.py", "chip/utils/CommissioningBuildingBlocks.py", "chip/utils/__init__.py", + "chip/yaml/DataModelLookup.py", "chip/yaml/YamlParser.py", "chip/yaml/YamlUtils.py", "chip/yaml/__init__.py", diff --git a/src/controller/python/chip/yaml/DataModelLookup.py b/src/controller/python/chip/yaml/DataModelLookup.py new file mode 100644 index 00000000000000..1e0c3ffe6f3f14 --- /dev/null +++ b/src/controller/python/chip/yaml/DataModelLookup.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/YamlParser.py b/src/controller/python/chip/yaml/YamlParser.py index 3fa4c543202e29..111c5eb1fd079f 100644 --- a/src/controller/python/chip/yaml/YamlParser.py +++ b/src/controller/python/chip/yaml/YamlParser.py @@ -15,127 +15,250 @@ # 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.clusters as Clusters import chip.interaction_model import asyncio as asyncio import logging import math +from chip.yaml.DataModelLookup import ( + DataModelLookup as DataModelLookup, + PreDefinedDataModelLookup as PreDefinedDataModelLookup) import chip.yaml.YamlUtils as YamlUtils logger = logging.getLogger('YamlParser') -class ParsingError(Exception): +class ParsingError(ValueError): def __init__(self, message): super().__init__(message) -class SingleCommandInterface: - '''Interface for a single yaml command that is to be executed.''' +class UnexpectedParsingError(ParsingError): + def __init__(self, message): + super().__init__(message) - def __init__(self): - pass - def run_command(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): +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 ClusterCommand(SingleCommandInterface): - '''Single cluster command to be executed including validation of response.''' +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) - def __init__(self, label, request_type_name, cluster): - self.label: str = label - self.request_type_name: str = request_type_name - self.cluster: str = cluster - self.request_data: dict = field(default_factory=dict) - self.request_object: None = None - self.expected_response_data: dict = field(default_factory=dict) - self.expected_response_object: None = None - self.expected_raw_response: dict = field(default_factory=dict) - super().__init__() + if command is None: + raise ParsingError( + f'Failed to find cluster:{self._cluster} Command:{self._command_name}') - def run_command(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): + command_object = command() + if (item.get('arguments')): + args = item['arguments']['values'] + + request_data_as_dict = YamlUtils.convert_name_value_pair_to_dict(args) + + try: + request_data = YamlUtils.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 = YamlUtils.convert_name_value_pair_to_dict(expected_response_args) + expected_response_data = YamlUtils.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)) + resp = asyncio.run(dev_ctrl.SendCommand(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')): + if (self._expected_raw_response is not None and + self._expected_raw_response.get('error')): 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} didnt match ' + 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 ReadAttributeCommand(SingleCommandInterface): - '''Single read attribute command to be executed including validation.''' - - def __init__(self, label, request_type_name, cluster): - self.label: str = label - self.request_type_name: str = request_type_name - self.cluster: str = cluster - self.request_object: None = None - self.expected_response_data: dict = field(default_factory=dict) - self.expected_response_object: None = None - self.expected_raw_response: dict = field(default_factory=dict) - self.possibly_unsupported: bool = False - super().__init__() - - def run_command(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): +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 = YamlUtils.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)])) + resp = asyncio.run(dev_ctrl.ReadAttribute(node_id, [(self._request_object)])) except chip.interaction_model.InteractionModelError: - if (self.expected_raw_response is not None and - self.expected_raw_response.get('error')): + if (self._expected_raw_response is not None and + self._expected_raw_response.get('error')): logger.debug('Got error, but was expected') else: raise - if self.possibly_unsupported and not resp: - # We have found an unsupported attribute and test case did specify - # that it might be unsupports, so nothing left to validate. + 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): - cluster_object_key = eval(f'Clusters.Objects.{self.cluster}') - cluster_value_key = eval( - f'Clusters.Objects.{self.cluster}.Attributes.{self.request_type_name}') - parsed_resp = resp[endpoint][cluster_object_key][cluster_value_key] + 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): + 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 ' + 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 WriteAttributeCommand(SingleCommandInterface): - '''Single write attribute command to be executed including validation.''' +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 = YamlUtils.convert_yaml_type( + args, attribute.attribute_type.Type) + except ValueError: + raise ParsingError('Could not covert yaml type') - def __init__(self, label, request_type_name, cluster): - self.label: str = label - self.request_type_name: str = request_type_name - self.cluster: str = cluster - self.request_data: dict = field(default_factory=dict) - self.request_object: None = None - super().__init__() + # 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_command(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): + 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)])) + 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')): @@ -143,166 +266,17 @@ def run_command(self, dev_ctrl: ChipDeviceCtrl, endpoint: int, node_id: int): else: raise - # TODO: confirm resp give a Success value, although not all write commands are expected + # 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') -def ClusterCommandFactory(item: dict, cluster: str): - '''Parse cluster command from yaml test configuration. - - Args: - 'item': Dictionary contains single cluster command test to be parsed - 'cluster': Name of cluster command is targeting. - Returns: - ReadAttributeCommand if 'item' is a valid command to be executed. - None if 'item' was not parsed to a command to be executed for a known reason - that is none fatal. - Raises: - ParsingError: Raised if there is an unexpected parsing error. - ''' - test = ClusterCommand(item['label'], stringcase.pascalcase(item['command']), cluster) - - try: - test.request_object = eval(f'Clusters.{test.cluster}.Commands.{test.request_type_name}')() - except AttributeError: - pass - - if test.request_object is None: - return None - - if (item.get('arguments')): - args = item['arguments']['values'] - - test.request_data = YamlUtils.fixup_yaml_arguments(args) - - try: - test.request_data = YamlUtils.fixup_yaml_types( - test.request_data, type(test.request_object)) - except ValueError: - return None - - # Create a cluster object for the request from the provided YAML data. - test.request_object = test.request_object.FromDict(test.request_data) - - test.expected_raw_response = item.get('response') - if (test.request_object.response_type is not None and - test.expected_raw_response is not None and - test.expected_raw_response.get('values')): - response_type = stringcase.pascalcase(test.request_object.response_type) - expected_command = f'Clusters.{test.cluster}.Commands.{response_type}' - test.expected_response_object = eval(expected_command) - test.expected_response_data = test.expected_raw_response['values'] - test.expected_response_data = YamlUtils.fixup_yaml_arguments(test.expected_response_data) - - test.expected_response_data = YamlUtils.fixup_yaml_types( - test.expected_response_data, test.expected_response_object) - test.expected_response_object = test.expected_response_object.FromDict( - test.expected_response_data) - - return test - - -def AttributeReadCommandFactory(item: dict, cluster: str): - '''Parse read attribute command from yaml test configuration. - - Args: - 'item': Dictionary contains single read attribute test to be parsed - 'cluster': Name of cluster read attribute command is targeting. - Returns: - ReadAttributeCommand if 'item' is a valid command to be executed. - None if 'item' was not parsed to a command to be executed for a known reason - that is none fatal. - Raises: - ParsingError: Raised if there is an unexpected parsing error. - ''' - test = ReadAttributeCommand(item['label'], stringcase.pascalcase(item['attribute']), cluster) - - try: - test.request_object = eval(f'Clusters.{test.cluster}.Attributes.{test.request_type_name}') - except AttributeError: - pass - - if test.request_object is None: - raise ParsingError( - f'ReadAttribute failed to find cluster:{test.cluster} ' - f'Attribute:{test.request_type_name}') - - if (item.get('arguments')): - raise ParsingError(f'ReadAttribute should not contain arguments. {test.label}') - - if test.request_object.attribute_type is None: - raise ParsingError(f'ReadAttribute doesnt have valid attribute_type. {test.label}') - - test.expected_raw_response = item.get('response') - if (test.expected_raw_response is None): - raise ParsingError(f'ReadAttribute missing expected response. {test.label}') - - if 'optional' in item: - test.possibly_unsupported = True - - if 'value' in test.expected_raw_response: - test.expected_response_object = test.request_object.attribute_type.Type - value = test.expected_raw_response['value'] - test.expected_response_data = YamlUtils.fixup_yaml_types( - value, test.expected_response_object, use_from_dict=True) - - return test - - -def AttributeWriteCommandFactory(item: dict, cluster: str): - '''Parse write attribute command from yaml test configuration. - - Args: - 'item': Dictionary contains single write attribute test to be parsed - 'cluster': Name of cluster write attribute command is targeting. - Returns: - WriteAttributeCommand if 'item' is a valid command to be executed. - None if 'item' was not parsed to a command to be executed for a known reason - that is none fatal. - Raises: - ParsingError: Raised if there is an unexpected parsing error. - ''' - test = WriteAttributeCommand(item['label'], stringcase.pascalcase(item['attribute']), cluster) - - try: - test.request_object = eval(f'Clusters.{test.cluster}.Attributes.{test.request_type_name}') - except AttributeError: - pass - - if test.request_object is None: - raise ParsingError( - f'WriteAttribute failed to find cluster:{test.cluster} ' - f'Attribute:{test.request_type_name}') - - if (item.get('arguments')): - args = item['arguments']['value'] - try: - test.request_data = YamlUtils.fixup_yaml_types( - args, test.request_object.attribute_type.Type) - except ValueError: - return None - - # Create a cluster object for the request from the provided YAML data. - test.request_object = test.request_object(test.request_data) - else: - raise ParsingError(f'WriteAttribute command does have arguments {test.label}') - - return test - - class YamlTestParser: '''Parses the test YAMLs and converts to a more natural Pythonic representation. The parser also permits execution of those tests there-after. ''' - _name: str - _node_id: int - _cluster: str - _endpoint: int - _base_command_test_list: typing.List[SingleCommandInterface] - _raw_data: dict def __init__(self, yaml_path: str): '''Constructor that parser the given a path to YAML test file.''' @@ -316,12 +290,13 @@ def __init__(self, yaml_path: str): self._node_id = self._raw_data['config']['nodeId'] self._cluster = self._raw_data['config']['cluster'].replace(' ', '') self._endpoint = self._raw_data['config']['endpoint'] - self._base_command_test_list = [] + self._base_action_test_list = [] + self._data_model_lookup = PreDefinedDataModelLookup() for item in self._raw_data['tests']: # We only support parsing invoke interactions. As support for write/reads get added, # these skips will be removed. - test = None + action = None cluster = self._cluster # Some of the tests contain 'cluster over-rides' that refer to a different # cluster than that specified in 'config'. @@ -332,20 +307,65 @@ def __init__(self, yaml_path: str): logger.info(f"Test is disabled, skipping {item['label']}") continue if item['command'] == 'writeAttribute': - test = AttributeWriteCommandFactory(item, cluster) + action = self._attribute_write_action_factory(item, cluster) elif item['command'] == 'readAttribute': - test = AttributeReadCommandFactory(item, cluster) + action = self._attribute_read_action_factory(item, cluster) else: - test = ClusterCommandFactory(item, cluster) + action = self._invoke_action_factory(item, cluster) - if test is not None: - self._base_command_test_list.append(test) + 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, test in enumerate(self._base_command_test_list): - logger.info(f'Test: {idx} -- Executing{test.label}') + for idx, action in enumerate(self._base_action_test_list): + logger.info(f'test: {idx} -- Executing{action.label}') - test.run_command(dev_ctrl, self._endpoint, self._node_id) + action.run_action(dev_ctrl, self._endpoint, self._node_id) diff --git a/src/controller/python/chip/yaml/YamlUtils.py b/src/controller/python/chip/yaml/YamlUtils.py index de4325e8560aae..c82ece77eef70c 100644 --- a/src/controller/python/chip/yaml/YamlUtils.py +++ b/src/controller/python/chip/yaml/YamlUtils.py @@ -30,7 +30,7 @@ def __init__(self, message): super().__init__(message) -def fixup_yaml_arguments(arg_values): +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 @@ -48,7 +48,7 @@ def fixup_yaml_arguments(arg_values): return ret_value -def fixup_yaml_types(field_value, field_type, use_from_dict=False): +def convert_yaml_type(field_value, field_type, use_from_dict=False): ''' Converts yaml value to expected python type. The YAML representation when converted to a Python dictionary does not @@ -97,7 +97,7 @@ def fixup_yaml_types(field_value, field_type, use_from_dict=False): raise ValidationError( f'Did not find field "{item}" in {str(field_type)}') from None - return_field_value[field_descriptor.Label] = fixup_yaml_types( + 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) @@ -110,7 +110,7 @@ def fixup_yaml_types(field_value, field_type, use_from_dict=False): # 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] = fixup_yaml_types(item, list_element_type, use_from_dict) + 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. From 8159e2c54c6433f865c4c8eda0ce567a7fb93934 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 8 Nov 2022 00:13:06 +0000 Subject: [PATCH 03/10] Reduce line length to 100 --- src/controller/python/chip/yaml/YamlParser.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/controller/python/chip/yaml/YamlParser.py b/src/controller/python/chip/yaml/YamlParser.py index 111c5eb1fd079f..3d4e247d7cd081 100644 --- a/src/controller/python/chip/yaml/YamlParser.py +++ b/src/controller/python/chip/yaml/YamlParser.py @@ -113,8 +113,10 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup) 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 = YamlUtils.convert_name_value_pair_to_dict(expected_response_args) - expected_response_data = YamlUtils.convert_yaml_type(expected_response_data_as_dict, expected_command) + expected_response_data_as_dict = YamlUtils.convert_name_value_pair_to_dict( + expected_response_args) + expected_response_data = YamlUtils.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): @@ -258,7 +260,8 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup) 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)])) + 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')): From a18c5b04a6041b887e7093080975232ecbc3362a Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 8 Nov 2022 14:59:38 +0000 Subject: [PATCH 04/10] Address PR comments --- src/controller/python/chip/yaml/YamlParser.py | 30 +++++++++++-------- src/controller/python/chip/yaml/YamlUtils.py | 7 ++--- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/controller/python/chip/yaml/YamlParser.py b/src/controller/python/chip/yaml/YamlParser.py index 3d4e247d7cd081..5e3f72486dfc56 100644 --- a/src/controller/python/chip/yaml/YamlParser.py +++ b/src/controller/python/chip/yaml/YamlParser.py @@ -31,7 +31,7 @@ PreDefinedDataModelLookup as PreDefinedDataModelLookup) import chip.yaml.YamlUtils as YamlUtils - +_SUCCESS_STATUS_CODE = "SUCCESS" logger = logging.getLogger('YamlParser') @@ -123,8 +123,11 @@ 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 not None and - self._expected_raw_response.get('error')): + 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 @@ -195,9 +198,12 @@ 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 not None and - self._expected_raw_response.get('error')): - logger.debug('Got error, but was expected') + 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 @@ -297,18 +303,18 @@ def __init__(self, yaml_path: str): self._data_model_lookup = PreDefinedDataModelLookup() for item in self._raw_data['tests']: - # We only support parsing invoke interactions. As support for write/reads get added, - # these skips will be removed. + # 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.get('disabled'): - logger.info(f"Test is disabled, skipping {item['label']}") - continue if item['command'] == 'writeAttribute': action = self._attribute_write_action_factory(item, cluster) elif item['command'] == 'readAttribute': diff --git a/src/controller/python/chip/yaml/YamlUtils.py b/src/controller/python/chip/yaml/YamlUtils.py index c82ece77eef70c..01b4897900130a 100644 --- a/src/controller/python/chip/yaml/YamlUtils.py +++ b/src/controller/python/chip/yaml/YamlUtils.py @@ -19,10 +19,9 @@ from chip.clusters.Types import Nullable, NullValue from chip.tlv import uint, float32 import enum -import stringcase -HEX_PREFIX = 'hex:' +_HEX_PREFIX = 'hex:' class ValidationError(Exception): @@ -123,8 +122,8 @@ def convert_yaml_type(field_value, field_type, use_from_dict=False): 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):]) + 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: From 5a6030eca0ebbb994c263aa7be7e3386f92c076d Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 8 Nov 2022 17:14:01 +0000 Subject: [PATCH 05/10] Address PR comments --- src/controller/python/chip/yaml/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controller/python/chip/yaml/__init__.py b/src/controller/python/chip/yaml/__init__.py index da8aad82f35c67..4315d5f2e7d7b1 100644 --- a/src/controller/python/chip/yaml/__init__.py +++ b/src/controller/python/chip/yaml/__init__.py @@ -17,8 +17,7 @@ # # @file -# Provides Python APIs for CHIP. -# +# Provides Python APIs for Matter. -"""Provides yaml parser Python APIs for CHIP.""" +"""Provides yaml parser Python APIs for Matter.""" from . import YamlParser From b071a557e11bbf29ac20712e40ef181f4b095c30 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 8 Nov 2022 21:10:44 +0000 Subject: [PATCH 06/10] Fix minor nit docstring issue --- src/controller/python/chip/yaml/YamlUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/python/chip/yaml/YamlUtils.py b/src/controller/python/chip/yaml/YamlUtils.py index 01b4897900130a..8c89b68861042b 100644 --- a/src/controller/python/chip/yaml/YamlUtils.py +++ b/src/controller/python/chip/yaml/YamlUtils.py @@ -48,7 +48,7 @@ def convert_name_value_pair_to_dict(arg_values): def convert_yaml_type(field_value, field_type, use_from_dict=False): - ''' Converts yaml value to expected python type. + ''' 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 From 45e634123eb3e7e2b9cdceb7d9b9ad24155dc442 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 9 Nov 2022 14:49:41 +0000 Subject: [PATCH 07/10] Address more PR comments, rename module names to adhere to guidelines --- src/controller/python/BUILD.gn | 7 +++-- src/controller/python/chip/yaml/__init__.py | 2 +- ...ataModelLookup.py => data_model_lookup.py} | 0 src/controller/python/chip/yaml/errors.py | 30 +++++++++++++++++++ .../{YamlUtils.py => format_converter.py} | 6 +--- .../chip/yaml/{YamlParser.py => parser.py} | 29 ++++++------------ 6 files changed, 45 insertions(+), 29 deletions(-) rename src/controller/python/chip/yaml/{DataModelLookup.py => data_model_lookup.py} (100%) create mode 100644 src/controller/python/chip/yaml/errors.py rename src/controller/python/chip/yaml/{YamlUtils.py => format_converter.py} (97%) rename src/controller/python/chip/yaml/{YamlParser.py => parser.py} (95%) diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 6df6d39a92fff6..129804bddaa232 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -226,9 +226,10 @@ chip_python_wheel_action("chip-core") { "chip/storage/__init__.py", "chip/utils/CommissioningBuildingBlocks.py", "chip/utils/__init__.py", - "chip/yaml/DataModelLookup.py", - "chip/yaml/YamlParser.py", - "chip/yaml/YamlUtils.py", + "chip/yaml/data_model_lookup.py", + "chip/yaml/format_converter.py", + "chip/yaml/errors.py", + "chip/yaml/parser.py", "chip/yaml/__init__.py", ] diff --git a/src/controller/python/chip/yaml/__init__.py b/src/controller/python/chip/yaml/__init__.py index 4315d5f2e7d7b1..055bec97cafac4 100644 --- a/src/controller/python/chip/yaml/__init__.py +++ b/src/controller/python/chip/yaml/__init__.py @@ -20,4 +20,4 @@ # Provides Python APIs for Matter. """Provides yaml parser Python APIs for Matter.""" -from . import YamlParser +from . import parser diff --git a/src/controller/python/chip/yaml/DataModelLookup.py b/src/controller/python/chip/yaml/data_model_lookup.py similarity index 100% rename from src/controller/python/chip/yaml/DataModelLookup.py rename to src/controller/python/chip/yaml/data_model_lookup.py 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/YamlUtils.py b/src/controller/python/chip/yaml/format_converter.py similarity index 97% rename from src/controller/python/chip/yaml/YamlUtils.py rename to src/controller/python/chip/yaml/format_converter.py index 8c89b68861042b..11e38f8a9efb0a 100644 --- a/src/controller/python/chip/yaml/YamlUtils.py +++ b/src/controller/python/chip/yaml/format_converter.py @@ -19,16 +19,12 @@ from chip.clusters.Types import Nullable, NullValue from chip.tlv import uint, float32 import enum +from chip.yaml.errors import ValidationError _HEX_PREFIX = 'hex:' -class ValidationError(Exception): - def __init__(self, message): - super().__init__(message) - - def convert_name_value_pair_to_dict(arg_values): ''' Fix yaml command arguments. diff --git a/src/controller/python/chip/yaml/YamlParser.py b/src/controller/python/chip/yaml/parser.py similarity index 95% rename from src/controller/python/chip/yaml/YamlParser.py rename to src/controller/python/chip/yaml/parser.py index 5e3f72486dfc56..6370ceba9ff339 100644 --- a/src/controller/python/chip/yaml/YamlParser.py +++ b/src/controller/python/chip/yaml/parser.py @@ -26,25 +26,14 @@ import asyncio as asyncio import logging import math -from chip.yaml.DataModelLookup import ( - DataModelLookup as DataModelLookup, - PreDefinedDataModelLookup as PreDefinedDataModelLookup) -import chip.yaml.YamlUtils as YamlUtils +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 ParsingError(ValueError): - def __init__(self, message): - super().__init__(message) - - -class UnexpectedParsingError(ParsingError): - def __init__(self, message): - super().__init__(message) - - class BaseAction(ABC): '''Interface for a single yaml action that is to be executed.''' @@ -92,10 +81,10 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup) if (item.get('arguments')): args = item['arguments']['values'] - request_data_as_dict = YamlUtils.convert_name_value_pair_to_dict(args) + request_data_as_dict = Converter.convert_name_value_pair_to_dict(args) try: - request_data = YamlUtils.convert_yaml_type( + request_data = Converter.convert_yaml_type( request_data_as_dict, type(command_object)) except ValueError: raise ParsingError('Could not covert yaml type') @@ -113,9 +102,9 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup) 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 = YamlUtils.convert_name_value_pair_to_dict( + expected_response_data_as_dict = Converter.convert_name_value_pair_to_dict( expected_response_args) - expected_response_data = YamlUtils.convert_yaml_type( + expected_response_data = Converter.convert_yaml_type( expected_response_data_as_dict, expected_command) self._expected_response_object = expected_command.FromDict(expected_response_data) @@ -191,7 +180,7 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup) 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 = YamlUtils.convert_yaml_type( + 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): @@ -254,7 +243,7 @@ def __init__(self, item: dict, cluster: str, data_model_lookup: DataModelLookup) if (item.get('arguments')): args = item['arguments']['value'] try: - request_data = YamlUtils.convert_yaml_type( + request_data = Converter.convert_yaml_type( args, attribute.attribute_type.Type) except ValueError: raise ParsingError('Could not covert yaml type') From 3219ed81b4b7abb9d115a4f600c3fdfc2bc20b1e Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 9 Nov 2022 14:53:23 +0000 Subject: [PATCH 08/10] Fix style --- src/controller/python/BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 129804bddaa232..81e387f46efbe8 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -226,11 +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/format_converter.py", "chip/yaml/errors.py", + "chip/yaml/format_converter.py", "chip/yaml/parser.py", - "chip/yaml/__init__.py", ] if (chip_controller) { From bf51cbe7d462efa6e29483fbd345e9c1c7f4348b Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 9 Nov 2022 21:19:55 +0000 Subject: [PATCH 09/10] Apparently cluster is not always set in 'config' --- src/controller/python/chip/yaml/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controller/python/chip/yaml/parser.py b/src/controller/python/chip/yaml/parser.py index 6370ceba9ff339..67fc363ccf12a0 100644 --- a/src/controller/python/chip/yaml/parser.py +++ b/src/controller/python/chip/yaml/parser.py @@ -286,7 +286,9 @@ def __init__(self, yaml_path: str): self._name = self._raw_data['name'] self._node_id = self._raw_data['config']['nodeId'] - self._cluster = self._raw_data['config']['cluster'].replace(' ', '') + 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() From 6985d0440e0b27b2755c5f5144e913a747e796b0 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 10 Nov 2022 17:02:00 +0000 Subject: [PATCH 10/10] Fix up chip-repl CI failure --- .../python/chip/clusters/Objects.py | 490 +++++++++--------- .../templates/python-cluster-Objects-py.zapt | 4 +- 2 files changed, 247 insertions(+), 247 deletions(-) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 376efeaf0f0ed4..476925f68e71fb 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -85,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -101,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -261,7 +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: str = 'AddGroupResponse' + response_type: typing.ClassVar[str] = 'AddGroupResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -279,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -297,7 +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: str = 'ViewGroupResponse' + response_type: typing.ClassVar[str] = 'ViewGroupResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -313,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -333,7 +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: str = 'GetGroupMembershipResponse' + response_type: typing.ClassVar[str] = 'GetGroupMembershipResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -349,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -367,7 +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: str = 'RemoveGroupResponse' + response_type: typing.ClassVar[str] = 'RemoveGroupResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -383,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -401,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -415,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -597,7 +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: str = 'AddSceneResponse' + response_type: typing.ClassVar[str] = 'AddSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -621,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -641,7 +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: str = 'ViewSceneResponse' + response_type: typing.ClassVar[str] = 'ViewSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -659,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -685,7 +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: str = 'RemoveSceneResponse' + response_type: typing.ClassVar[str] = 'RemoveSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -703,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -723,7 +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: str = 'RemoveAllScenesResponse' + response_type: typing.ClassVar[str] = 'RemoveAllScenesResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -739,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -757,7 +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: str = 'StoreSceneResponse' + response_type: typing.ClassVar[str] = 'StoreSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -775,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -795,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -815,7 +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: str = 'GetSceneMembershipResponse' + response_type: typing.ClassVar[str] = 'GetSceneMembershipResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -831,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -853,7 +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: str = 'EnhancedAddSceneResponse' + response_type: typing.ClassVar[str] = 'EnhancedAddSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -877,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -897,7 +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: str = 'EnhancedViewSceneResponse' + response_type: typing.ClassVar[str] = 'EnhancedViewSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -915,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -941,7 +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: str = 'CopySceneResponse' + response_type: typing.ClassVar[str] = 'CopySceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -965,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1217,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1231,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1245,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1259,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1277,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1291,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1679,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1701,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1723,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1747,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1765,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1787,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1809,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1833,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1851,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3305,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3323,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3343,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3361,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3381,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3399,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3417,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3437,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3455,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3473,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3493,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3511,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3791,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4326,7 +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: str = 'QueryImageResponse' + response_type: typing.ClassVar[str] = 'QueryImageResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4356,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4386,7 +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: str = 'ApplyUpdateResponse' + response_type: typing.ClassVar[str] = 'ApplyUpdateResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4404,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4422,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4597,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6239,7 +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: str = 'ArmFailSafeResponse' + response_type: typing.ClassVar[str] = 'ArmFailSafeResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6257,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6275,7 +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: str = 'SetRegulatoryConfigResponse' + response_type: typing.ClassVar[str] = 'SetRegulatoryConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6295,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6313,7 +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: str = 'CommissioningCompleteResponse' + response_type: typing.ClassVar[str] = 'CommissioningCompleteResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6327,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6633,7 +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: str = 'ScanNetworksResponse' + response_type: typing.ClassVar[str] = 'ScanNetworksResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6651,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6673,7 +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: str = 'NetworkConfigResponse' + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6693,7 +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: str = 'NetworkConfigResponse' + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6711,7 +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: str = 'NetworkConfigResponse' + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6729,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6749,7 +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: str = 'ConnectNetworkResponse' + response_type: typing.ClassVar[str] = 'ConnectNetworkResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6767,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6787,7 +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: str = 'NetworkConfigResponse' + response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7060,7 +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: str = 'RetrieveLogsResponse' + response_type: typing.ClassVar[str] = 'RetrieveLogsResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7080,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7300,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7682,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8152,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -9376,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -9797,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -10142,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11196,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11224,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11244,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11481,7 +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: str = 'AttestationResponse' + response_type: typing.ClassVar[str] = 'AttestationResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11497,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11515,7 +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: str = 'CertificateChainResponse' + response_type: typing.ClassVar[str] = 'CertificateChainResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11531,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11547,7 +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: str = 'CSRResponse' + response_type: typing.ClassVar[str] = 'CSRResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11565,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11583,7 +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: str = 'NOCResponse' + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11607,7 +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: str = 'NOCResponse' + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11625,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11645,7 +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: str = 'NOCResponse' + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11661,7 +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: str = 'NOCResponse' + response_type: typing.ClassVar[str] = 'NOCResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11677,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11969,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11985,7 +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: str = 'KeySetReadResponse' + response_type: typing.ClassVar[str] = 'KeySetReadResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12001,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12017,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12033,7 +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: str = 'KeySetReadAllIndicesResponse' + response_type: typing.ClassVar[str] = 'KeySetReadAllIndicesResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12049,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13025,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13502,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13522,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13542,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13564,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13592,7 +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: str = 'GetWeekDayScheduleResponse' + response_type: typing.ClassVar[str] = 'GetWeekDayScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13610,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13640,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13658,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13680,7 +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: str = 'GetYearDayScheduleResponse' + response_type: typing.ClassVar[str] = 'GetYearDayScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13698,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13722,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13740,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13762,7 +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: str = 'GetHolidayScheduleResponse' + response_type: typing.ClassVar[str] = 'GetHolidayScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13778,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13802,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13818,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13850,7 +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: str = 'GetUserResponse' + response_type: typing.ClassVar[str] = 'GetUserResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13866,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13900,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13920,7 +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: str = 'SetCredentialResponse' + response_type: typing.ClassVar[str] = 'SetCredentialResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13950,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13970,7 +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: str = 'GetCredentialStatusResponse' + response_type: typing.ClassVar[str] = 'GetCredentialStatusResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13986,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14010,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14929,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14943,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14957,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14971,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14987,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15003,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15019,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15515,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15531,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16782,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16800,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16822,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16844,7 +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: str = 'GetWeeklyScheduleResponse' + response_type: typing.ClassVar[str] = 'GetWeeklyScheduleResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16862,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18395,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18419,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18441,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18465,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18487,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18509,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18533,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18557,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18581,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18603,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18627,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18649,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18673,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18695,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18719,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18743,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18771,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18789,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18815,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21651,7 +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: str = 'ChangeChannelResponse' + response_type: typing.ClassVar[str] = 'ChangeChannelResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21667,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21685,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21703,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21900,7 +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: str = 'NavigateTargetResponse' + response_type: typing.ClassVar[str] = 'NavigateTargetResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21918,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22120,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22134,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22148,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22162,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22176,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22190,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22204,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22218,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22232,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22248,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22264,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22282,7 +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: str = 'PlaybackResponse' + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22556,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22572,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22586,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22600,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22758,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22974,7 +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: str = 'SendKeyResponse' + response_type: typing.ClassVar[str] = 'SendKeyResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22990,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23235,7 +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: str = 'LaunchResponse' + response_type: typing.ClassVar[str] = 'LaunchResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23255,7 +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: str = 'LaunchResponse' + response_type: typing.ClassVar[str] = 'LaunchResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23275,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23463,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23479,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23675,7 +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: str = 'LauncherResponse' + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23693,7 +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: str = 'LauncherResponse' + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23709,7 +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: str = 'LauncherResponse' + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23725,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24156,7 +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: str = 'GetSetupPINResponse' + response_type: typing.ClassVar[str] = 'GetSetupPINResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24176,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24192,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24214,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24596,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24618,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24632,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24658,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27152,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27166,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27182,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27196,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27212,7 +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: str = 'TestSpecificResponse' + response_type: typing.ClassVar[str] = 'TestSpecificResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27226,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27242,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27256,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27282,7 +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: str = 'TestAddArgumentsResponse' + response_type: typing.ClassVar[str] = 'TestAddArgumentsResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27300,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27316,7 +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: str = 'TestSimpleArgumentResponse' + response_type: typing.ClassVar[str] = 'TestSimpleArgumentResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27332,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27350,7 +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: str = 'TestStructArrayArgumentResponse' + response_type: typing.ClassVar[str] = 'TestStructArrayArgumentResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27376,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27398,7 +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: str = 'BooleanResponse' + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27414,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27484,7 +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: str = 'BooleanResponse' + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27500,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27516,7 +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: str = 'BooleanResponse' + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27532,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27548,7 +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: str = 'BooleanResponse' + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27564,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27580,7 +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: str = 'BooleanResponse' + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27596,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27612,7 +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: str = 'BooleanResponse' + response_type: typing.ClassVar[str] = 'BooleanResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27628,7 +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: str = 'TestListInt8UReverseResponse' + response_type: typing.ClassVar[str] = 'TestListInt8UReverseResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27644,7 +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: str = 'TestEnumsResponse' + response_type: typing.ClassVar[str] = 'TestEnumsResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27662,7 +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: str = 'TestNullableOptionalResponse' + response_type: typing.ClassVar[str] = 'TestNullableOptionalResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27678,7 +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: str = 'TestComplexNullableOptionalResponse' + response_type: typing.ClassVar[str] = 'TestComplexNullableOptionalResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27716,7 +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: str = 'SimpleStructResponse' + response_type: typing.ClassVar[str] = 'SimpleStructResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27732,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27750,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27766,7 +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: str = 'TestEmitTestEventResponse' + response_type: typing.ClassVar[str] = 'TestEmitTestEventResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27786,7 +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: str = 'TestEmitTestFabricScopedEventResponse' + response_type: typing.ClassVar[str] = 'TestEmitTestFabricScopedEventResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29283,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29307,7 +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: str = None + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 7da379de6885a0..5695721c7100c6 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -91,9 +91,9 @@ class {{asUpperCamelCase name}}(Cluster): {{/if}} {{~#if responseName}} - response_type: str = '{{asUpperCamelCase responseName}}' + response_type: typing.ClassVar[str] = '{{asUpperCamelCase responseName}}' {{else}} - response_type: str = None + response_type: typing.ClassVar[str] = None {{/if}} @ChipUtility.classproperty