Skip to content

Commit 2e75882

Browse files
committed
add metadata property to devices
This makes the `update` json object available, providing access to firmware state information. Signed-off-by: Mike Szczys <[email protected]>
1 parent e704005 commit 2e75882

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

golioth/golioth.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,13 @@ def blueprint(self):
393393
def tags(self):
394394
return self.info['tagIds']
395395

396+
@property
397+
def metadata(self) -> dict | None:
398+
if 'metadata' in self.info:
399+
return self.info['metadata']
400+
else:
401+
return None
402+
396403
async def refresh(self):
397404
async with self.http_client as c:
398405
resp = await c.get(self.base_url)

0 commit comments

Comments
 (0)