1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-12-06 18:44:14 -05:00
Files
hacs-oasis_mini/custom_components/oasis_mini/pyoasiscontrol/clients/transport.py
2025-11-22 04:40:58 +00:00

86 lines
2.0 KiB
Python

from __future__ import annotations
from typing import Protocol, runtime_checkable
from ..device import OasisDevice
@runtime_checkable
class OasisClientProtocol(Protocol):
"""Transport/client interface for an Oasis device.
Concrete implementations:
- MQTT client (remote connection)
- HTTP client (direct LAN)
"""
async def async_get_mac_address(self, device: OasisDevice) -> str | None: ...
async def async_send_ball_speed_command(
self,
device: OasisDevice,
speed: int,
) -> None: ...
async def async_send_led_command(
self,
device: OasisDevice,
led_effect: str,
color: str,
led_speed: int,
brightness: int,
) -> None: ...
async def async_send_sleep_command(self, device: OasisDevice) -> None: ...
async def async_send_move_job_command(
self,
device: OasisDevice,
from_index: int,
to_index: int,
) -> None: ...
async def async_send_change_track_command(
self,
device: OasisDevice,
index: int,
) -> None: ...
async def async_send_add_joblist_command(
self,
device: OasisDevice,
tracks: list[int],
) -> None: ...
async def async_send_set_playlist_command(
self,
device: OasisDevice,
playlist: list[int],
) -> None: ...
async def async_send_set_repeat_playlist_command(
self,
device: OasisDevice,
repeat: bool,
) -> None: ...
async def async_send_set_autoplay_command(
self,
device: OasisDevice,
option: str,
) -> None: ...
async def async_send_upgrade_command(
self,
device: OasisDevice,
beta: bool,
) -> None: ...
async def async_send_play_command(self, device: OasisDevice) -> None: ...
async def async_send_pause_command(self, device: OasisDevice) -> None: ...
async def async_send_stop_command(self, device: OasisDevice) -> None: ...
async def async_send_reboot_command(self, device: OasisDevice) -> None: ...