Skip to content

Add trigger_ota_update for gen2 devices#150

Merged
chemelli74 merged 2 commits intomainfrom
chemelli74-gen2-ota
Oct 24, 2021
Merged

Add trigger_ota_update for gen2 devices#150
chemelli74 merged 2 commits intomainfrom
chemelli74-gen2-ota

Conversation

@chemelli74
Copy link
Copy Markdown
Collaborator

Add trigger_ota_update() for gen2 Devices.
(ref: https://shelly-api-docs.shelly.cloud/gen2/Overview/CommonServices/Shelly/#shellyupdate)

Closes issue #145

Copy link
Copy Markdown
Contributor

@thecode thecode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@chemelli74 chemelli74 merged commit 5bf564e into main Oct 24, 2021
@chemelli74 chemelli74 deleted the chemelli74-gen2-ota branch October 24, 2021 07:45
async def trigger_ota_update(self, beta: bool = False) -> None:
"""Trigger an ota update."""
params = {"stage": "beta"} if beta else {"stage": "stable"}
await self._wsrpc.call("Shelly.Update", params)
Copy link
Copy Markdown
Contributor

@mib1185 mib1185 Oct 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chemelli74
would be great if we return the result of this RPC call
opened #151 for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants