[RPC tool] Add more device types for lighting and closure b/287002457 Change-Id: I06914218d4af9e3eda560b4a1689425c7ef7ffa0
diff --git a/rpc_tool/verify_rpc/rpc_tool.py b/rpc_tool/verify_rpc/rpc_tool.py index fc516e7..dfacb3d 100644 --- a/rpc_tool/verify_rpc/rpc_tool.py +++ b/rpc_tool/verify_rpc/rpc_tool.py
@@ -68,6 +68,7 @@ class MatterAppType(enum.Enum): """Matter application type.""" LIGHT = "light" + CLOSURE = "closure" NONE = "none" @@ -75,18 +76,38 @@ """The supported Matter device types and their IDs in spec.""" # Matter device type spec: # https://github.com/CHIP-Specifications/connectedhomeip-spec/tree/master/src/device_types - ColorTemperatureLight = 0x010C - DimmableLight = 0x0101 + + # Lighting Device Types OnOffLight = 0x0100 + DimmableLight = 0x0101 + ColorTemperatureLight = 0x010C + ExtendedColorLight = 0x010D + + # Closure Device Types + DoorLock = 0x000A + DoorLockController = 0x000B + WindowCovering = 0x0202 + WindowCoveringController = 0x0203 + NoneOfTheAbove = -1 # Device type and app type mapping # TODO: Add more types mapping DeviceTypeToAppType = immutabledict.immutabledict({ - MatterDeviceType.ColorTemperatureLight: MatterAppType.LIGHT, - MatterDeviceType.DimmableLight: MatterAppType.LIGHT, + + # Lighting Device Types MatterDeviceType.OnOffLight: MatterAppType.LIGHT, + MatterDeviceType.DimmableLight: MatterAppType.LIGHT, + MatterDeviceType.ColorTemperatureLight: MatterAppType.LIGHT, + MatterDeviceType.ExtendedColorLight: MatterAppType.LIGHT, + + # Closure Device Types + MatterDeviceType.DoorLock: MatterAppType.CLOSURE, + MatterDeviceType.DoorLockController: MatterAppType.CLOSURE, + MatterDeviceType.WindowCovering: MatterAppType.CLOSURE, + MatterDeviceType.WindowCoveringController: MatterAppType.CLOSURE, + MatterDeviceType.NoneOfTheAbove: MatterAppType.NONE })