From 0c280122fb5b3f37cc30d91ea334d2d8473c63f1 Mon Sep 17 00:00:00 2001 From: Arksine Date: Mon, 4 Jan 2021 07:05:54 -0500 Subject: [PATCH] websockets: Add "update_refreshed" notification Signed-off-by: Eric Callahan --- moonraker/websockets.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/moonraker/websockets.py b/moonraker/websockets.py index 30f67cf..2135633 100644 --- a/moonraker/websockets.py +++ b/moonraker/websockets.py @@ -186,6 +186,8 @@ class WebsocketManager: "gpio_power:power_changed", self._handle_power_changed) self.server.register_event_handler( "update_manager:update_response", self._handle_update_response) + self.server.register_event_handler( + "update_manager:update_refreshed", self._handle_update_refreshed) async def _handle_klippy_ready(self): await self.notify_websockets("klippy_ready") @@ -211,6 +213,9 @@ class WebsocketManager: async def _handle_update_response(self, response): await self.notify_websockets("update_response", response) + async def _handle_update_refreshed(self, refresh_info): + await self.notify_websockets("update_refreshed", refresh_info) + def register_local_handler(self, api_def, callback): for ws_method, req_method in \ zip(api_def.ws_methods, api_def.request_methods):