1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-11-17 01:23:43 -05:00

Add sleep button

This commit is contained in:
Nathan Spencer
2025-07-22 23:36:33 +00:00
parent 06008e8f4c
commit d2bc89bdd7
4 changed files with 21 additions and 0 deletions

View File

@@ -20,9 +20,11 @@ STATUS_CODE_MAP = {
3: "centering",
4: "playing",
5: "paused",
6: "sleeping",
9: "error",
11: "updating",
13: "downloading",
14: "busy",
15: "live",
}
@@ -331,6 +333,10 @@ class OasisMini:
"""Set repeat playlist."""
await self._async_command(params={"WRIREPEATJOB": 1 if repeat else 0})
async def async_sleep(self) -> None:
"""Send sleep command."""
await self._async_command(params={"CMDSLEEP": ""})
async def async_stop(self) -> None:
"""Send stop command."""
await self._async_command(params={"CMDSTOP": ""})