Add brightness control to Key Colors targets with HAOS integration

Adds brightness (0.0-1.0) to KeyColorsSettings, applies scaling in the
KC processing pipeline after smoothing, exposes a slider on the WebUI
target card, and creates a HA number entity for KC target brightness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 02:26:46 +03:00
parent 10e426be13
commit 46be9922bd
8 changed files with 131 additions and 11 deletions

View File

@@ -52,6 +52,7 @@ class KeyColorsSettingsSchema(BaseModel):
interpolation_mode: str = Field(default="average", description="Color mode (average, median, dominant)")
smoothing: float = Field(default=0.3, description="Temporal smoothing (0.0-1.0)", ge=0.0, le=1.0)
pattern_template_id: str = Field(default="", description="Pattern template ID for rectangle layout")
brightness: float = Field(default=1.0, description="Output brightness (0.0-1.0)", ge=0.0, le=1.0)
class ExtractedColorResponse(BaseModel):