from typing import Protocol, runtime_checkable


@runtime_checkable
class LightProtocol(Protocol):
    async def turn_on(self) -> None: ...
    async def turn_off(self) -> None: ...
    async def set_level(sealf, level: int) -> None: ...

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

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

    def supports_level(self) -> bool: ...
