mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user