Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions bambulabs_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,3 +780,13 @@ def wifi_signal(self) -> str:
str: Wifi signal
"""
return self.mqtt_client.wifi_signal()

def reboot(self) -> bool:
"""
Reboot printer. Warning: this will reboot printer and may require
manual reconnecting.

Returns:
bool: if printer has been rebooted correctly
"""
return self.mqtt_client.reboot()
17 changes: 17 additions & 0 deletions bambulabs_api/mqtt_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,3 +1299,20 @@ def wifi_signal(self) -> str:
str: Wifi signal
"""
return self.__get_print("wifi_signal", "")

def reboot(self) -> bool:
"""
Reboot printer. Warning: this will reboot printer and may require
manual reconnecting.

Returns:
bool: if printer has been rebooted correctly
"""
logging.warning("Sending reboot command!")
return self.__publish_command(
{
"system": {
"command": "reboot"
}
}
)