"""AmbiLED device provider — serial LED controller using AmbiLED protocol."""

from wled_controller.core.devices.led_client import LEDClient
from wled_controller.core.devices.serial_provider import SerialDeviceProvider


class AmbiLEDDeviceProvider(SerialDeviceProvider):
    """Provider for AmbiLED serial LED controllers."""

    @property
    def device_type(self) -> str:
        return "ambiled"

    def create_client(self, url: str, **kwargs) -> LEDClient:
        from wled_controller.core.devices.ambiled_client import AmbiLEDClient
        return AmbiLEDClient(
            url,
            led_count=kwargs.get("led_count", 0),
            baud_rate=kwargs.get("baud_rate"),
        )
