Skip to content

Commit

Permalink
[Python] SetupPayload export version property. (project-chip#27959)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng-yang authored and erwinpan1 committed Jul 21, 2023
1 parent 41ab65a commit bf091f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controller/python/chip/setup_payload/setup_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit bf091f2

Please sign in to comment.