Add power panel

This commit is contained in:
Jordan Ruthe
2020-11-28 14:00:26 -05:00
parent 48c276d22f
commit cc59ec68d0
8 changed files with 198 additions and 2 deletions

View File

@@ -202,6 +202,24 @@ class MoonrakerApi:
updates
)
def power_device_off(self, device, callback=None, *args):
logger.debug("Sending machine.device_power.off: %s" % device)
return self._ws.send_method(
"machine.device_power.off",
{device: False},
callback,
*args
)
def power_device_on(self, device, callback=None, *args):
logger.debug("Sending machine.device_power.on %s" % device)
return self._ws.send_method(
"machine.device_power.on",
{device: False},
callback,
*args
)
def print_cancel(self, callback=None, *args):
logger.debug("Sending printer.print.cancel")
return self._ws.send_method(