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

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


class AdalightDeviceProvider(SerialDeviceProvider):
    """Provider for Adalight serial LED controllers."""

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

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