Add factory-reset command to cli (#1108)

Allow reseting devices to factory settings using the cli: `kasa device factory-reset`.
This commit is contained in:
Teemu R.
2024-09-21 16:52:52 +02:00
committed by GitHub
parent f07341a5a6
commit b7fa0d2040
2 changed files with 27 additions and 0 deletions

View File

@@ -166,6 +166,17 @@ async def reboot(plug, delay):
return await plug.reboot(delay)
@device.command()
@pass_dev
async def factory_reset(plug):
"""Reset device to factory settings."""
click.confirm(
"Do you really want to reset the device to factory settings?", abort=True
)
return await plug.factory_reset()
@device.command()
@pass_dev
@click.option(