mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Add factory_reset() to iotdevice (#1125)
Also extend the base device class API to make factory_reset() part of the common API.
This commit is contained in:
@@ -561,6 +561,13 @@ class IotDevice(Device):
|
||||
"""
|
||||
await self._query_helper("system", "reboot", {"delay": delay})
|
||||
|
||||
async def factory_reset(self) -> None:
|
||||
"""Reset device back to factory settings.
|
||||
|
||||
Note, this does not downgrade the firmware.
|
||||
"""
|
||||
await self._query_helper("system", "reset")
|
||||
|
||||
async def turn_off(self, **kwargs) -> dict:
|
||||
"""Turn off the device."""
|
||||
raise NotImplementedError("Device subclass needs to implement this.")
|
||||
|
Reference in New Issue
Block a user