From df20d674e5277f968643e6a4f0c90a645444c527 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Sun, 24 Oct 2021 22:22:35 +0200 Subject: [PATCH] return result from RPC call in trigger_ota_update --- aioshelly/rpc_device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aioshelly/rpc_device.py b/aioshelly/rpc_device.py index dbe561fa..ffb8562a 100644 --- a/aioshelly/rpc_device.py +++ b/aioshelly/rpc_device.py @@ -110,10 +110,10 @@ def subscribe_updates(self, update_listener: Callable) -> None: """Subscribe to device status updates.""" self._update_listener = update_listener - async def trigger_ota_update(self, beta: bool = False) -> None: + async def trigger_ota_update(self, beta: bool = False) -> dict[str, Any]: """Trigger an ota update.""" params = {"stage": "beta"} if beta else {"stage": "stable"} - await self._wsrpc.call("Shelly.Update", params) + return await self._wsrpc.call("Shelly.Update", params) async def update_status(self) -> None: """Get device status from 'Shelly.GetStatus'."""