diff --git a/aioshelly/__init__.py b/aioshelly/__init__.py index db6af56b..8aca5aeb 100644 --- a/aioshelly/__init__.py +++ b/aioshelly/__init__.py @@ -346,6 +346,17 @@ async def switch_light_mode(self, mode): """Change device mode color/white.""" return await self.http_request("get", "settings", {"mode": mode}) + async def trigger_ota_update(self, beta=False, url=None): + """Trigger an ota update.""" + params = {"update": "true"} + + if url: + params = {"url": url} + elif beta: + params = {"beta": "true"} + + return await self.http_request("get", "ota", params=params) + @property def initialized(self): """Device initialized."""