from typing import Protocol, runtime_checkable


@runtime_checkable
class ValveProtocol(Protocol):
    async def open(self) -> None: ...
    async def close(self) -> None: ...
    async def stop(self) -> None: ...
    async def set_position(self, position: int) -> None: ...

    def supports_open(self) -> bool: ...
    def supports_close(self) -> bool: ...
    def supports_stop(self) -> bool: ...
    def supports_position(self) -> bool: ...

    @property
    def is_closed(self) -> bool: ...

    @property
    def is_closing(self) -> bool: ...

    @property
    def is_opening(self) -> bool: ...

    @property
    def current_position(self) -> int | None: ...
