from uuid import UUID, uuid4 from typing import Literal from pydantic import BaseModel, Field StripType = Literal["sk6812", "ws2801", "generic"] class DeviceConfig(BaseModel): id: UUID = Field(default_factory=uuid4) name: str strip_type: StripType led_count: int = Field(gt=0, le=1000) ip: str port: int = Field(ge=1, le=65535) enabled: bool = True model_config = {"populate_by_name": True}