mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Initial trigger logs implementation (#900)
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
@@ -193,3 +193,13 @@ async def update_credentials(dev, username, password):
|
||||
click.confirm("Do you really want to replace the existing credentials?", abort=True)
|
||||
|
||||
return await dev.update_credentials(username, password)
|
||||
|
||||
|
||||
@device.command(name="logs")
|
||||
@pass_dev_or_child
|
||||
async def child_logs(dev):
|
||||
"""Print child device trigger logs."""
|
||||
if logs := dev.modules.get(Module.TriggerLogs):
|
||||
await dev.update(update_children=True)
|
||||
for entry in logs.logs:
|
||||
print(entry)
|
||||
|
Reference in New Issue
Block a user