8000 Add reboot() to the device interface by rytilahti · Pull Request #1124 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

Add reboot() to the device interface #1124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions kasa/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,14 @@ async def wifi_join(self, ssid: str, password: str, keytype: str = "wpa2_psk"):
async def set_alias(self, alias: str):
"""Set the device name (alias)."""

@abstractmethod
async def reboot(self, delay: int = 1) -> None:
"""Reboot the device.

Note that giving a delay of zero causes this to block,
as the device reboots immediately without responding to the call.
"""

def __repr__(self):
if self._last_update is None:
return f"<{self.device_type} at {self.host} - update() needed>"
Expand Down
Loading
0