docs(set_leds): note that segment start/length are now optional

The set_leds service handler is already pass-through, so the new
server-side defaults (start=0, length=rest-of-strip) work with no
code change. Refresh the field descriptions in services.yaml and
strings.json so the UI surfaces the simpler {"mode","color"} payload.
This commit is contained in:
2026-04-26 23:45:25 +03:00
parent ca5b0a8014
commit e8f2b5e528
2 changed files with 18 additions and 4 deletions
+5 -3
View File
@@ -11,9 +11,11 @@ set_leds:
segments:
name: Segments
description: >
List of segment objects. Each segment has: start (int), length (int),
mode ("solid"/"per_pixel"/"gradient"), color ([R,G,B] for solid),
colors ([[R,G,B],...] for per_pixel/gradient)
List of segment objects. Each segment has: start (int, optional —
defaults to 0), length (int, optional — defaults to the rest of the
strip from start), mode ("solid"/"per_pixel"/"gradient"), color
([R,G,B] for solid), colors ([[R,G,B],...] for per_pixel/gradient).
Example fill-whole-strip: [{"mode": "solid", "color": [255, 0, 0]}].
required: true
selector:
object:
+13 -1
View File
@@ -29,6 +29,9 @@
"button": {
"activate_scene": {
"name": "{scene_name}"
},
"sync_clock_reset": {
"name": "Reset"
}
},
"light": {
@@ -39,6 +42,9 @@
"switch": {
"processing": {
"name": "Processing"
},
"sync_clock_running": {
"name": "Running"
}
},
"sensor": {
@@ -56,6 +62,9 @@
},
"mapped_lights": {
"name": "Mapped Lights"
},
"sync_clock_elapsed": {
"name": "Elapsed Time"
}
},
"number": {
@@ -76,6 +85,9 @@
},
"api_input_timeout": {
"name": "Fallback Timeout"
},
"sync_clock_speed": {
"name": "Speed"
}
},
"select": {
@@ -106,7 +118,7 @@
},
"segments": {
"name": "Segments",
"description": "List of segment objects with start, length, mode, and color/colors fields."
"description": "List of segment objects. start and length are optional (default to 0 and the rest of the strip); mode is one of solid/per_pixel/gradient with color or colors."
}
}
}