refactor: key colors targets → CSS source type, HA target improvements
Lint & Test / test (push) Successful in 1m26s

Key Colors refactor:
- New `key_colors` CSS source type with inline rectangles
- KeyColorsColorStripStream: extracts N colors from screen regions
- CSS editor: EntitySelect for picture source, IconSelect for color mode
- Configure Regions button on card opens pattern canvas editor
- Live WS preview at 5 FPS with rectangle overlay + color swatches
- Removed KC target type, pattern template entity, and related API routes
- Removed KC/pattern template sections from Targets tab

HA light target improvements:
- Update rate, transition, mappings, brightness VS now editable via PUT
- Card crosslinks for HA source, CSS source, brightness VS
- HA connection status icon, text metrics (Hz, uptime)
- Brightness value source selector in editor
This commit is contained in:
2026-03-28 15:28:22 +03:00
parent 89d1b13854
commit 3e6760f726
46 changed files with 2707 additions and 789 deletions
@@ -1167,6 +1167,23 @@
"color_strip.type.candlelight": "Candlelight",
"color_strip.type.candlelight.desc": "Realistic flickering candle simulation",
"color_strip.type.candlelight.hint": "Simulates realistic candle flickering across all LEDs with warm tones and organic flicker patterns.",
"color_strip.type.key_colors": "Key Colors",
"color_strip.type.key_colors.desc": "Extract colors from screen regions",
"color_strip.key_colors.picture_source": "Picture Source:",
"color_strip.key_colors.interpolation": "Color Mode:",
"color_strip.key_colors.smoothing": "Smoothing:",
"color_strip.key_colors.brightness": "Brightness:",
"color_strip.key_colors.rectangles": "Screen Regions:",
"color_strip.key_colors.no_rects": "No regions defined. Click Configure Regions to add.",
"color_strip.key_colors.configure_regions": "Configure Regions",
"color_strip.key_colors.mode.average": "Average",
"color_strip.key_colors.mode.average.desc": "Mean color of all pixels in the region",
"color_strip.key_colors.mode.median": "Median",
"color_strip.key_colors.mode.median.desc": "Median color (less affected by outliers)",
"color_strip.key_colors.mode.dominant": "Dominant",
"color_strip.key_colors.mode.dominant.desc": "Most frequent color (K-means clustering)",
"color_strip.key_colors.error.no_source": "Picture source is required",
"color_strip.key_colors.error.no_rects": "At least one screen region is required",
"color_strip.type.weather": "Weather",
"color_strip.type.weather.desc": "Weather-reactive ambient colors",
"color_strip.type.weather.hint": "Maps real-time weather conditions to ambient LED colors. Requires a Weather Source entity.",