From 42274806cd6dfc2f48a99dd2dfb706a582fc5e26 Mon Sep 17 00:00:00 2001 From: tianfeng-yang <130436698+tianfeng-yang@users.noreply.github.com> Date: Sat, 15 Jul 2023 02:01:15 +0800 Subject: [PATCH] [Python] SetupPayload export version property. (#27959) --- src/controller/python/chip/setup_payload/setup_payload.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controller/python/chip/setup_payload/setup_payload.py b/src/controller/python/chip/setup_payload/setup_payload.py index c6a6b6a690e423..1f70983ad9a7ff 100644 --- a/src/controller/python/chip/setup_payload/setup_payload.py +++ b/src/controller/python/chip/setup_payload/setup_payload.py @@ -122,6 +122,10 @@ def __InitNativeFunctions(self, chipLib): # Getters from parsed contents. # Prefer using the methods below to access setup payload information once parse. + @property + def version(self) -> int: + return int(self.attributes.get("Version", "0")) + @property def vendor_id(self) -> int: return int(self.attributes.get("VendorID", "0"))