From e8f2b5e528b81e63a1f435b4ffe6b07bf30f155f Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Sun, 26 Apr 2026 23:45:25 +0300 Subject: [PATCH] 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. --- custom_components/ledgrab/services.yaml | 8 +++++--- custom_components/ledgrab/strings.json | 14 +++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/custom_components/ledgrab/services.yaml b/custom_components/ledgrab/services.yaml index 8499fdd..11b853b 100644 --- a/custom_components/ledgrab/services.yaml +++ b/custom_components/ledgrab/services.yaml @@ -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: diff --git a/custom_components/ledgrab/strings.json b/custom_components/ledgrab/strings.json index ed9795d..2292311 100644 --- a/custom_components/ledgrab/strings.json +++ b/custom_components/ledgrab/strings.json @@ -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." } } }