mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 18:38:03 +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:
@@ -457,6 +457,13 @@ class Device(ABC):
|
||||
as the device reboots immediately without responding to the call.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
async def factory_reset(self) -> None:
|
||||
"""Reset device back to factory settings.
|
||||
|
||||
Note, this does not downgrade the firmware.
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
if self._last_update is None:
|
||||
return f"<{self.device_type} at {self.host} - update() needed>"
|
||||
|
Reference in New Issue
Block a user