From 071a43015961228f15c54e91f01f5d515a1584c8 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Fri, 11 Mar 2022 16:51:23 -0500 Subject: [PATCH] klippy_apis: send events on pause, resume, and cancel requests Signed-off-by: Eric Callahan --- moonraker/components/klippy_apis.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moonraker/components/klippy_apis.py b/moonraker/components/klippy_apis.py index c0ddf6b..038e5aa 100644 --- a/moonraker/components/klippy_apis.py +++ b/moonraker/components/klippy_apis.py @@ -62,12 +62,15 @@ class KlippyAPI(Subscribable): "/printer/firmware_restart", ['POST'], self._gcode_firmware_restart) async def _gcode_pause(self, web_request: WebRequest) -> str: + self.server.send_event("klippy_apis:pause_requested") return await self._send_klippy_request("pause_resume/pause", {}) async def _gcode_resume(self, web_request: WebRequest) -> str: + self.server.send_event("klippy_apis:resume_requested") return await self._send_klippy_request("pause_resume/resume", {}) async def _gcode_cancel(self, web_request: WebRequest) -> str: + self.server.send_event("klippy_apis:cancel_requested") return await self._send_klippy_request("pause_resume/cancel", {}) async def _gcode_start_print(self, web_request: WebRequest) -> str: